Appearance
IDEA的一些设置
1.自动导包
2.忽略大小写提示
3.取消单行tabs显示
4.项目文件编码
5.类注释
java
/**
* @Author: xueqimiao
* @Date: ${DATE} ${TIME}
*/
/**
*
* @ProjectName: ${PROJECT_NAME}
* @ClassName: ${NAME}
* @Description: TODO(一句话描述该类的功能)
* @Author: ${USER}
* @Date: ${DATE} ${TIME}
* @version v1.0
*/
${PACKAGE_NAME}
name of the package in which the new file is created
${USER}
current user system login name
${DATE}
current system date
${TIME}
current system time
${YEAR}
current year
${MONTH}
current month
${MONTH_NAME_SHORT}
first 3 letters of the current month name. Example: Jan, Feb, etc.
${MONTH_NAME_FULL}
full name of the current month. Example: January, February, etc.
${DAY}
current day of the month
${DAY_NAME_SHORT}
first 3 letters of the current day name. Example: Mon, Tue, etc.
${DAY_NAME_FULL}
full name of the current day. Example: Monday, Tuesday, etc.
${HOUR}
current hour
${MINUTE}
current minute
${PROJECT_NAME}
the name of the current project
6.方法注释
java
/**
* @Author: xueqimiao
* @Title: $enclosing_method$
* @Description:
* @param @param $tags$
* @return @return $return_type$
* @throws
* @Date: ${DATE} ${TIME}
*/
/**
* @Title: $enclosing_method$
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param @param $tags$
* @return @return $return_type$
* @author $user$
* @throws
* @date $date$ $time$
*/
7.设置不自动折叠
8.解决tomcat控制台乱码问题
sh
-Dfile.encoding=UTF-8
9.@Autowired注解报错和下方有波浪线
10.去除波浪线
1、代码中的波浪线
File -- Setting -- Editor -- Inspections,右侧搜索General,取消√,保存退出
11、IDEA自动生成序列化ID
File -> Settings -> Editor -> Inspections -> 搜索 Serialization issues ,找到 Serializable class without 'serialVersionUID' ->打上勾,Apply->OK
12、开启Run DashBoard
自己的项目路径下的.idea文件夹下的workspace.xml F:\1\xxx.idea RunDashboard标签(自己加)下加上以下内容后重启IDEA
xml
<option name="configurationTypes">
<set>
<option value="SpringBootApplicationConfigurationType" />
</set>
</option>
- 下面这种也行
xml
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
13、双斜杠注释改成紧跟代码头
14、Codota 代码智能提示插件
只要打出首字母就能联想出一整条语句,这也太智能了,还显示了每条语句使用频率。
原因是它学习了我的项目代码,总结出了我的代码偏好。
15、Key Promoter X 快捷键提示插件
每次都会在右下角弹窗提示,帮助我们快速熟悉快捷键。
16、CodeGlance 显示代码缩略图插件
当代码很多的时候,方便查看,很有用。
17、CamelCase 驼峰命名和下划线命名转换
这几种风格的命名方式,用快捷键 ⇧ + ⌥ + U / Shift + Alt + U可以进行快速转换,当我们需要修改大量变量名称的时候很方便。
18、SonarLint 代码质量检查插件
提示我不要用System.out输出,要用logger输出,诸如此类,帮助我们提升代码质量。
19、Translation 翻译插件
20、Rainbow Brackets 彩虹括号插件
21、2021新版idea过滤无用文件
点击加号,添加需要过滤的后缀,如:*.iml。 回车apply即可生效