解决新版 Idea 中 SpringBoot 热部署不生效的问题
标题
依赖中添加
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
插件中设置
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin>
1.设置自动编译
Idea 中 setting -> Compiler-> 勾选automatically
2. spring boot 启动设置
编辑启动配置,点击modify options。
options 中需要修改两个配置:
1.On 'Update' action 中选择 Hot swap classes and update trigger file if failed
2.On frame deactivation 中选择 Update classes and resources
3.以 debug 模式启动应用
到此这篇关于解决新版 Idea 中 SpringBoot 热部署不生效的文章就介绍到这了,更多相关idea springboot热部署内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
相关文章
浅谈springboot @Repository与@Mapper的区别
本文主要介绍了浅谈springboot @Repository与@Mapper的区别,文中通过示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下2022-03-03
最新评论