idal  springBoot 访问html页面遇到的坑

只说过程

配置thymeleaf 模板引擎 --->resources 目录下创建templates包,创建一个html

springBoot 访问html页面遇到的坑

在usercontroller 中

springBoot 访问html页面遇到的坑

返回的就是html的内容

static中是css,js的文件,在application.properties中加入

spring.mvc.static-path-pattern=/static/**
(必须)

可以引用css,js的文件

 

相关文章: