IDEA常见设置
对于eclipse实在忍无可忍,各种功能各种bug。。换回IDEA
IDEA常见问题(其实不是问题,代码规范而已)
1.解决无限 This file is indented with tabs instead of 4 spaces
File -> Settings -> Editor -> Code Style -> Java -> Tabs and Indents -> Use tab character
2.创建class时自动创建注释
File->settings->Editor->File and Code Templates->Files->Class
我设置的注释为
/** * FileName: ${NAME} * Author: ${USER} * Date: ${DATE} ${TIME} * Description: ${DESCRIPTION} */ #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "") package ${PACKAGE_NAME}; #end /** * 〈一句话功能简述〉<br> * 〈${DESCRIPTION}〉 * * @author ${USER} * @create ${DATE} * @since 1.0.0 */ public class ${NAME} { }
3.修改默认浏览器
3.jsp中写java代码报错(嵌套java代码虽然是比较不可取的)
(1)右键项目,open moudle setting
(2)选择libraries,添加(绿色加号)java,找到tomcat中的servlet-api.jar,ok