spring boot

Spring Boot IDEA热部署

2018-03-13  本文已影响0人  啊呦弄傻呢

Spring Boot使用的是spring-boot-devtools是一个为开发者服务的一个模块。其原理用了classLoader 其中一个加载不变的类,另一个restart ClassLoader加载变得类。

devtools会监听classpath下的文件变动,并且会立即重启应用(发生在保存时机)。

一、pom的依赖直接添加坐标。

二、编译节点添加。

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

(2)Ctrl+Shift+Alt+ /

重启项目即可。

上一篇 下一篇

猜你喜欢

热点阅读