Springboot项目基于Devtools实现热部署步骤详解
1.在pom.xml(如果是多模块,则此pom根据需要可设为具体模块)文件中添加
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional></dependency>
2.在pom.xml(如果是多模块,则此pom为父工程文件)加入插件
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration><fork>true</fork><addResources>true</addResources> </configuration> </plugin> </plugins></build>
3.IDEA设置自动编译
4.在IDEA任意界面使用快捷键ctrl+shif+Alt+/打开如下菜单,点击第一个选项(1.Registry...)
选择后会出现如下子菜单,勾选compiler.automake.allow.when.app.running与actionSystem.assertFocusAccessFromEdt
5.重启IDEA。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持好吧啦网。
相关文章:
1. 在.NET Core 中使用 FluentValidation 进行规则验证的方法2. 一篇文章弄清楚Ajax请求的五个步骤3. springboot访问template下的html页面的实现配置4. PHP实现简单日历类编写5. spring-boot-maven-plugin引入出现爆红(已解决)6. 关于Jenkins + Docker + ASP.NET Core自动化部署的问题(避免踩坑)7. react axios 跨域访问一个或多个域名问题8. 在Vue中创建可重用的 Transition的方法9. idea2020.1无法自动加载maven依赖的jar包问题及解决方法10. JSP 中response.setContentType()的作用及参数
