我是靠谱客的博主 昏睡棒球,这篇文章主要介绍spring boot 引入 thymeleaf 报Cannot resolve MVC View ‘index‘ 。,现在分享给大家,希望可以做个参考。

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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(40)

评论列表共有 0 条评论

立即
投稿
返回
顶部