spring boot热部署devtools
2024-08-28 09:36:03
1 pom.xml文件
注:热部署功能spring-boot-1.3开始有的
<!--添加依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<!-- optional=true,依赖不会传递,该项目依赖devtools;之后依赖myboot项目的项目如果想要使用devtools,需要重新引入 -->
<optional>true</optional>
</dependency>
注:project 中添加 spring-boot-maven-plugin,主要在eclipse中使用,idea中不需要添加此配置。
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
2 更改idea配置
1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。
2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。
3 Chrome禁用缓存
F12或者“Ctrl+Shift+I”,打开开发者工具,“Network” 选项卡下 选中打勾 “Disable Cache(while DevTools is open)”
最新文章
- 张小龙宣布微信小程序1月9日发布,并回答了大家最关心的8个问题
- CSS、j&#39;s单行、多行文本溢出显示省略号
- MySQL数据表操作
- anguar.js tutorial demo
- 【WEB】初探Spring MVC框架
- Atitit j2ee5 jee5 j2ee6 j2ee7 jee6 jee7 新特性
- iOS 活动图 流程图
- [Android Pro] 临时关闭selinux模式 setenforce 0
- Json数据格式事例查看
- Servlet中的请求转发和重定向
- Oracle中删除重复的经典方案
- 修改ie版本的注册表webbroswer
- Java 理论与实践: 非阻塞算法简介--转载
- linux网络编程常用头文件
- Map 根据value 排序
- Android事件分发机制详解
- 暑假练习赛 003 F Mishka and trip
- free 或delete后指针怎么样了
- JAVA基础复习与总结<;一>; 对象与类的概念_内部类_继承与多态
- JAVA反射机制及理解