spring boot 开发热部署配置 (idea IDE)

来源:互联网 发布:幼儿园网络研修的简报 编辑:程序博客网 时间:2024/06/05 17:01

一:模板热部署

在配置文件(.properties  ||  .yml)中加入以下内容

thymeleaf配置(其他模板类似):  

spring.thymeleaf.cache=falsespring.thymeleaf.mode=LEGACYHTML5


二:类文件热部署
添加devtools依赖:

maven中:

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

<build>   <plugins>      <plugin>         <groupId>org.springframework.boot</groupId>         <artifactId>spring-boot-maven-plugin</artifactId>         <configuration>            <fork>true</fork>         </configuration>      </plugin>   </plugins></build>

gradle中:

compile('org.springframework.boot:spring-boot-devtools')
bootRun {   addResources = true}

三:idea开启运行时自动编译设置
file->setting
ctrl+shift+alt+/
启动项目。。。
OK....
其他方式:1.下载spring loaded  2.jrebel


原创粉丝点击