ideal中配置热更新问题:配置好以后前端无法更新

1.pom文件下配置依赖:

<!--    热跟新    -->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <optional>true</optional>
</dependency>

<plugin>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-maven-plugin</artifactId>
  <!-- 添加项 -->
  <configuration>
  	<fork>true</fork>
  </configuration>
</plugin>

2.在application.properites中配置

#开启或关闭
spring.devtools.restart.enabled=true
#添加那个目录的文件需要restart
spring.devtools.restart.additional-paths=src/main/java
#排除那个目录的文件不需要restart
spring.devtools.restart.exclude=static/**,public/**

#禁止thymeleaf缓存(建议:开发环境设置为false,生成环境设置为true)
spring.thymeleaf.cache=false

3.在settings>Compiper>Build inde.... √

4.ctr+shift+alt+/ ->Resgis...> ...app.running √

5.【前端项目无法更新时是此处为修改】Eidt Configration > server > On Update 和On frame ...选项都选择Update classess and resources

posted @ 2020-06-30 12:19  seafwg  阅读(580)  评论(0编辑  收藏  举报