spring boot 引入 thymeleaf 报Cannot resolve MVC View 'index' 。
原因是 相关thymeleaf 相关jar包没有依赖上。工具问题
# 默认路径
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
<!-- thymeleaf 模板引用 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
最后
以上就是昏睡棒球最近收集整理的关于spring boot 引入 thymeleaf 报Cannot resolve MVC View ‘index‘ 。的全部内容,更多相关spring内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复