普通网友 2021-12-10 18:49 采纳率: 50%
浏览 40

spring-boot-starter-thymeleaf遇到的问题,怎么解决 搜了好多方法

访问controller,访问不了

img

controller代码

img

配置


spring.thymeleaf.prefix=classpath:/templates
spring.thymeleaf.suffix=.html
spring.thymeleaf.cache=false

报错
Error resolving template [Index], template might not exist or might not be accessible by any of the configured Template Resolvers

解析模板[Index]时出错,模板可能不存在,或者任何已配置的模板解析程序都无法访问该模板

  • 写回答

2条回答 默认 最新

  • 未聞花名丶 2021-12-10 19:40
    关注
    评论

报告相同问题?

问题事件

  • 修改了问题 12月10日
  • 创建了问题 12月10日