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

浙公网安备 33010602011771号