Spring Boot使用的是spring-boot-devtools是一个为开发者服务的一个模块。其原理用了classLoader 其中一个加载不变的类,另一个restart ClassLoader加载变得类。
devtools会监听classpath下的文件变动,并且会立即重启应用(发生在保存时机)。
一、pom的依赖直接添加坐标。

二、编译节点添加。

三、(1)设置Idea Ctrl+Alt+S

(2)Ctrl+Shift+Alt+ /


重启项目即可。
Spring Boot使用的是spring-boot-devtools是一个为开发者服务的一个模块。其原理用了classLoader 其中一个加载不变的类,另一个restart ClassLoader加载变得类。
devtools会监听classpath下的文件变动,并且会立即重启应用(发生在保存时机)。
一、pom的依赖直接添加坐标。
二、编译节点添加。
三、(1)设置Idea Ctrl+Alt+S
(2)Ctrl+Shift+Alt+ /
重启项目即可。
本文标题:Spring Boot IDEA热部署
本文链接:https://www.haomeiwen.com/subject/jdpzfftx.html
网友评论