zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    创建HttpFilter与理解多个Filter代码的执行顺序
    Filter
    JSTL
    EL
    JavaBean
    HttpSession之表单的重复提交 & 验证码
    相对路径和绝对路径
    HttpSession之简易购物车
    HttpSession
    Cookie
  • 原文地址:https://www.cnblogs.com/intelwisd/p/13213025.html
Copyright © 2011-2022 走看看