springboot默认是不支持jsp的

注意pom.xml是否添加了thymeleaf的依赖 

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

 

#thymelea模板配置 这是不必要填的 填在配置文件里面默认覆盖

spring.thymeleaf.prefix=classpath:/templates/

spring.thymeleaf.suffix=.html spring.thymeleaf.mode=HTML5

spring.thymeleaf.encoding=UTF-8

spring.thymeleaf.content-type=text/html

spring.thymeleaf.cache=false

spring.resources.chain.strategy.content.enabled=true

spring.resources.chain.strategy.content.paths=/**

相关文章:

  • 2022-12-23
  • 2021-07-31
  • 2021-10-27
  • 2021-10-26
  • 2022-12-23
  • 2021-09-19
  • 2021-10-03
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-11-08
  • 2022-02-15
  • 2022-12-23
相关资源
相似解决方案