IDEA SpringBoot项目配置热更新的步骤

1.在pom.xml中添加依赖:

<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<optional>true</optional>
		</dependency>

2.在pom.xml中添加插件:

<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
			<configuration>
				<fork>true</fork>
			</configuration>
		</plugin>

3.在IDEA中打开 File → Settings,将 Compiler 中的 Build project automatically 勾选,点击 Apply。

IDEA SpringBoot项目配置热更新的步骤详解(无需每次手动重启服务器)

4.完成后重启SpringBoot即可实现项目热更新,更改代码后只需按Ctrl+F9即可重新编译,无需重启。

觉得上面的内容有用吗?快来点个赞吧!

点赞() 我要打赏

温馨提示 : 本站内容来自会员投稿以及互联网,所有源码及教程均为作者总结编辑,请大家在使用过程中提前做好备份,以免发生无法预知的错误,源码类教程请勿直接用于生产环境!

 可能感兴趣的文章