application.properties配置了
spring.thymeleaf.prefix=classpath:/templates/
# 在构建 URL 时添加到视图名称后的后缀(默认值: .html )
spring.thymeleaf.suffix=.html
在controller中
不要写return “/index”;
应改为return “index”;
application.properties配置了
spring.thymeleaf.prefix=classpath:/templates/
# 在构建 URL 时添加到视图名称后的后缀(默认值: .html )
spring.thymeleaf.suffix=.html
在controller中
不要写return “/index”;
应改为return “index”;