您现在的位置是:首页 > 文章详情

SpringBoot-03-之热部署

日期:2018-07-15点击:375

避免修改内容后必须重启才能再继续玩耍

1:添加依赖:toly01\pom.xml
 <!--热部署--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> 
2.配置文件:src\main\resources\application-dev.yml
 spring: devtools: restart: enabled: true additional-paths: src/main/java 
3.IDE配置
idea热部署配置
4.其他配置:按照自己需要,一般情况上面的就够了
#热部署生效 spring.devtools.restart.enabled=true #设置重启的目录,添加指定目录的文件需要restart spring.devtools.restart.additional-paths=src/main/java # 为mybatis设置,生产环境可删除 restart.include.mapper=/mapper-[%%w-%%.]+jar restart.include.pagehelper=/pagehelper-[%%w-%%.]+jar #排除指定目录的文件不需要restart #spring.devtools.restart.exclude=static/**,public/** #classpath目录下的WEB-INF文件夹内容修改不重启 #spring.devtools.restart.exclude=WEB-INF/** #thymeleaf热部署 spring.thymeleaf.cache=false 
原文链接:https://yq.aliyun.com/articles/633892
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章