1.引入配置
pom.xml中
org.springframework.boot
spring-boot-devtools
1.5.6.RELEASE
runtime
2. 设置idea 应用程序运行时允许编译器自动生成
ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running
PS: 这里如果快捷键找不到可以 Help->FindAction ->搜索Registry 可以找到
File-Settings-Compiler-Build Project automatically
?设置完成啦
出现错误解决如出现 DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListener - Application fai
是因为spring-boot-devtools版本太高的原因,比如springbot版本较低,spring-boot-devtools版本较高
解决,降低spring-boot-devtools版本,spring-boot-devtools的版本改成比spring-boot-starter-parent版本低或者相同版本即可