IDEA工具 - 问题汇总

IDEA问题汇总

1.取消控制台打印行数限制

idea默认的控制台缓存是1024k。通过设置idea.properties文件中的 idea.cycle.buffer.size=disabled 可以取消限制。

 

2.IDEA配置Spring Boot热部署

添加依赖

<!--热部署依赖,生产环境、应用被打成jar包后,自动失效-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

添加配置文件

默认值是true。添加显示配置以防其他地方修改了默认值。

spring:
  devtools:
    restart:
      enabled: true

打开系统偏好设置(Preference)修改compiler

Command + Shift + A,搜索Registry

勾选自动编译

3.自动优化导入包

Preferences → Editor → General → Auto Import ,勾选Add unambiguous imports on the fly 和 Optimize imports on the fly。

  • Add unambiguous imports on the fly:快速添加明确的导入。
  • Optimize imports on the fly:快速优化导入,优化的意思即自动帮助删除无用的导入。

4.安装VisualVM插件

Preferences -> Plugins -> 搜索Visual VM,安装并重启IDEA

Preferences -> Other Settings -> VisualVM Launcher,配置jvisual和jdk home路径

mac下查看jdk home命令

/usr/libexec/java_home

 点击这里启动就会自动调起visual vm

 

5.IDEA提示“Unmapped Spring configuration files found.Please configure Spring facet.”

当项目导入IDEA之后,Event Log提示“Unmapped Spring configuration files found.Please configure Spring facet.”。 原因是web工程中的spring配置文件没有被IDEA所管理。

打开project的配置界面,选择“Modules”页签,再选择报“Unmapped Spring configuration files found.”的Module,点击“+”按钮:

在弹出的窗口内,全部勾选Unmapped的Spring配置文件,点击“确定”,然后在父界面中点击“应用”或“确定”完成保存。

6.IDEA提示“Error running 'Application': Command line is too long.”

找到 .idea/workspace.xml 中的 <component name="PropertiesComponent">,在该组件中添加代码

<property name="dynamic.classpath" value="true" />

 

posted @ 2019-09-19 20:08  Helios_Fz  阅读(219)  评论(0编辑  收藏  举报