zoukankan      html  css  js  c++  java
  • thymeleaf自动刷新页面

    导入thymeleaf依赖、热部署依赖devtools使页面实时生效

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

      

    html首页资源index放到gulimall-product下的static文件夹

    把index.html放到templates中

    关闭thymeleaf缓存,方便开发实时看到更新

     thymeleaf:
        cache: false
        suffix: .html
        prefix: classpath:/templates/
    

      关于页面自动刷新,导入上面的tool工具后,每次修改页面idea工具栏上面的ctrl+f9(重新编译)或者ctrl+shift+f9(重新编译当前页面)就是可以自动刷新页面了

  • 相关阅读:
    数据库
    linux
    linux
    python_函数进阶1
    python_函数初识
    python_文件操作
    python_基础数据类型补充
    python 小数据池,代码块总览
    python_基础数据类型二
    python_基础数据类型一
  • 原文地址:https://www.cnblogs.com/vincentmax/p/14468293.html
Copyright © 2011-2022 走看看