Java – spring boot and thymeleaf 3.0 0. Release integration
•
Java
I have a problem when I try to integrate spring boot 1.3 5. Release and thymeleaf 3.0 0. Release I know that spring boot now supports thymeleaf 3, so I try to solve this problem as follows:
@SpringBootApplication(exclude={org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration.class})
And add my own spring web config configuration Unfortunately, we received such an error:
java.lang.ClassNotFoundException: org.thymeleaf.resourceresolver.IResourceResolver at java.net.urlclassloader.findClass(urlclassloader.java:381) ~[na:1.8.0_66] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_66] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_66] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_66] ... 37 common frames omitted Wrapped by: java.lang.NoClassDefFoundError: org/thymeleaf/resourceresolver/IResourceResolver wrapped by: java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration due to org/thymeleaf/resourceresolver/IResourceResolver not found. M ake sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
Solution
It's simpler, just read:
<properties> <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version> <thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version> </properties>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码