在IDEA上springboot项目修改文件后无需重启(热部署)

想在调试springboot项目时,修改静态资源文件后不重启可以通过下面两步来达到目的

1、在pom中直接引入依赖

org.springframework springloaded 1.2.6.RELEASE org.springframework.boot spring-boot-devtools 1.3.0.RELEASE true 2、设置以下两项(第一项如已设置直接设置第二项)

1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。

2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running”

applivation run 前加 System.setProperty(“spring.devtools.restart.enabled”, “false”);

猜你喜欢

转载自blog.csdn.net/qq_35577329/article/details/89311792
今日推荐