解决新版 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热部署内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
相关文章
详解@ConfigurationProperties如何装载到Spring容器中
这篇文章主要为大家详细介绍了@ConfigurationProperties该如何装载到Spring容器中,文中的示例代码讲解详细,需要的小伙伴可以参考一下2023-07-07
详解Spring注解@Autowired的实现原理和使用方法
在使用Spring开发的时候,配置的方式主要有两种,一种是xml的方式,另外一种是 java config的方式,在使用的过程中,我们使用最多的注解应该就是@Autowired注解了,所以本文就给大家讲讲@Autowired注解是如何使用和实现的,需要的朋友可以参考下2023-07-07
SpringCloud整合OpenFeign实现微服务间的通信
微服务之间的通信⽅式,通常有两种: RPC 和 HTTP,在SpringCloud中, 默认是使⽤HTTP来进⾏微服务的通信, 最常⽤的实现形式有两种:RestTemplate和OpenFeign,本文给大家介绍了SpringCloud整合OpenFeign实现微服务间的通信,需要的朋友可以参考下2024-06-06


最新评论