springboot在controller返回数据到thymeleaf报404

今天用springboot做一个例子,访问controller可以返回数据,但是到thymeleaf却报404,

检查发现路径等没有问题,查阅资料得知

这是因为maven仓库jar包问题,把maven仓库中的所有jar包都删除了,然后重新下载,再启动项目

或者在pom文件的

properties

标签下加入

 <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
 <thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>

  

猜你喜欢

转载自www.cnblogs.com/shiysin/p/10569707.html