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

  • 相关阅读:
    正则表达式体会
    checkbox、全选反选,获取值
    弹出窗体值回调
    页面点击任意js事件,触发360、IE浏览器新页面
    XML增、删、改
    面试题
    行列转换
    DataTable 和Json 字符串互转
    前台js与后台方法互调
    文件与base64二进制转换
  • 原文地址:https://www.cnblogs.com/intelwisd/p/13213025.html
Copyright © 2011-2022 走看看