一.直接上解决方案吧!(不啰嗦了)
1.修改springboot版本我之前用的是2.1.4的最新版本,现在修改版本至
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.20.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
2.修改thymeleaf版本,
<properties>
<java.version>1.8</java.version>
<thymeleaf.version>3.0.9.RELEASE </thymeleaf.version>
<thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>
</properties>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
注:不使用springboot默认导入的thymeleaf版本
有解决最新版本springboot访问html问题的小伙伴可以在我下方留言!咱们共同进步!
最后
以上就是重要小霸王最近收集整理的关于eclipse下springboot整合thymeleaf模版后始终无法显示html页面的全部内容,更多相关eclipse下springboot整合thymeleaf模版后始终无法显示html页面内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复