spring-boot项目导入thymleaf模板依赖时,出错:
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration$ThymeleafDefaultConfiguration.templateEngine(ThymeleafAutoConfiguration.java:153)
去掉pom.xml配置文件中的thymleaf的版本号即可,让spring-boot自动适配版本号,这个错误是因为版本号不一致导致的,我把那个版本号去掉之后,错误就消失了。
依赖如下:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> <version>3.0.9.RELEASE</version> #将这个注释掉就可以了 </dependency>