在学习Springboot的过程中用到了thymeleaf模板,在controller层写访问网页的操作时,return部分显示Cannot resolve MVC view xxx
,运行之后访问对应的网页报错,后来查询资料发现是thymeleaf版本的问题,在pom.xml文件中导入thymeleaf的相关jar包代码如下:
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
<version>3.0.11.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
<version>3.0.4.RELEASE</version>
</dependency>