我是靠谱客的博主 重要小霸王,这篇文章主要介绍eclipse下springboot整合thymeleaf模版后始终无法显示html页面,现在分享给大家,希望可以做个参考。

一.直接上解决方案吧!(不啰嗦了)

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

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

评论列表共有 0 条评论

立即
投稿
返回
顶部