导入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(重新编译当前页面)就是可以自动刷新页面了

相关文章:

  • 2021-12-05
  • 2021-12-05
  • 2021-11-19
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-12-08
猜你喜欢
  • 2021-07-10
  • 2021-10-14
  • 2021-12-05
相关资源
相似解决方案