热门标签 | HotTags
当前位置:  开发笔记 > 运维 > 正文

SpringBoot热重启配置详解

在本篇文章里小编给大家分享的是关于SpringBoot热重启配置知识点内容,需要的朋友们可以学习下。

1.添加依赖


      org.springframework.boot
      spring-boot-devtools
      true  不能被其它模块继承,如果多个子模块可以去掉 不必须
      runtime   只在运行时起作用 打包时不打进去

安装成功后查看maven 依赖 如果存在spring-boot-devtools 并且没有红线证明成功添加

2.要重新编译项目

重启服务器

idea:

设置File ->Setting ->Compile: 勾选“Build project automatically”选项

知识点补充:

SpringBoot热启动

在pom文件中添加maven依赖

	
		org.springframework.boot
		spring-boot-devtools
		true
		true
	

下面 里的添加如下代码

	
    
      
        org.springframework.boot
        spring-boot-maven-plugin
        
        
          
          true
        
      
    
  

File --> Setting --> complier -->勾选Build Project automatically

快捷键 ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running (编译器自动允许当应用程序运行)

此时大功告成,修改代码后,不用重启程序访问的也是修改后的内容,若没效果,可稍等片刻。

以上就是小编整理的全部内容,希望能够帮助到大家。


推荐阅读
author-avatar
nashiyizhiyu_847_695
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有