• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
漫椿
博客园    首页    新随笔    联系   管理    订阅  订阅
Springboot实现Tomcat热部署

1开发者工具导入依赖

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

2使用构建项目操作启动热部署(ctrl+f9)

3自动启动热部署

设置自动构建项目,勾选Build project automatically‘

 

2Ctrl+Alt+Shift+/ 点击registry

 

 

 

3勾选app.runnging(表示运行的时候进行自动部署)

 

4.yml设置热部署的范围设置

devtools:
restart:
#设置不参与热部署的文件或文件夹
exclude: static/**,public/**,config/application.yml

5关闭热部署

public static void main(String[] args) {
System.setProperty("spring.devtools.restart.enabled","false");
SpringApplication.run(DruidApplication.class, args);
}

 






 

 

 



 

posted on 2022-02-09 09:52  编程耽误的厨子  阅读(233)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3