使用idea开发软件实现springboot热部署:
1、添加依赖,在pom.xml文件中添加依赖
<!--热部署--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
2、启动自动编译,打钩 File/settings/Compiler/Build Project autoMatically
3、选择Tomcat的 On 'Update' action 和 On frame deactivation 的选项为 '更新类和资源'
到此为止,既已经实现了热部署,在更该页面和后台代码时,只需刷新页面即可,不需再重新启动服务器。