IntelliJ IDEA 下 Spring Boot Devt
2017-04-21 本文已影响0人
吞噬悲伤的影子
添加依赖
使用 Maven 构建项目,在 pom.xml
中添加 spring-boot-devtools
。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<optional>true</optional>
阻止依赖传递。
配置编译器
使用 ⌘ + ,
打开 Preference
。

如上配置后,修改 Java 类后,项目会自动 Build。
但无法在项目运行和调试时进行,所以我们还要进行下一步配置,启用该功能。
配置 IDEA
使用 ⇧ + ⌘ + A
搜索 Registry
。

打开 Registry
,并 ☑️ complier.automark.allow.when.app.running
。
