使用Spring boot 2.2时thymeleaf发生的问题

使用Spring boot 2.2时thymeleaf发生的问题

今天使用spring boot 2.2时发现无法访问templates下的页面,经检查代码,项目结构均无问题,通过上网搜索发现了pom.xml中版本号的问题,并解决,以下是解决方案:
未修改前的pom文件


		UTF-8
		UTF-8
		1.8
		3.0.2.RELEASE
		2.1.1
	

这里用的是org.springframework.boot下的spring-boot-starter-thymeleaf,使用做标签时可能与org.thymeleaf有冲突,导致包获取不正确
可以看到thymeleaf的版本号处代码为

3.0.2.RELEASE

这里可能与org.springframework.boot下的spring-boot-stater-thymleaf冲突,导致包不正确,导致项目出现错误
修改为:


        1.8
        3.0.9.RELEASE
        2.3.0
    

修改后问题解决
使用Spring boot 2.2时thymeleaf发生的问题_第1张图片

你可能感兴趣的:(使用Spring boot 2.2时thymeleaf发生的问题)