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的文件

 

相关文章:

  • 2022-01-22
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2021-11-22
  • 2022-02-05
  • 2022-12-23
猜你喜欢
  • 2021-10-27
  • 2022-12-23
  • 2021-07-01
  • 2021-11-06
  • 2021-08-01
  • 2021-11-20
相关资源
相似解决方案