spring boot thymeleaf switching version

The new version of spring boot switch always error, solved some time ago, forgot, search again for a moment, record it:

Original Address: https://blog.csdn.net/Mr_Mocha/article/details/97419945

Add the following configuration in the pom.xml file

<the Properties>
<thymeleaf.version> 3.0.9.RELEASE </thymeleaf.version>
<-! Support program thymeleaf3 main layout features correspond layout2 above ->
<-! thymeleaf2 correspond layout1 version ->
< dialect.version-layout-Thymeleaf> 2.3.0 </thymeleaf-layout-dialect.version>
</ the Properties>
1
2
3
4
5
6
how to find these two configurations it? [Official document has told us]

Find spring-boot-dependencies of this file, find the corresponding configuration to the inside

Error! ! !

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call the method org.thymeleaf.spring5.SpringTemplateEngine.setRenderHiddenMarkersBeforeCheckboxes(Z)V but it does not exist. Its class, org.thymeleaf.spring5.SpringTemplateEngine, is available from the following locations:

jar:file:/D:/OpenSources/MyRepository/org/thymeleaf/thymeleaf-spring5/3.0.9.RELEASE/thymeleaf-spring5-3.0.9.RELEASE.jar!/org/thymeleaf/spring5/SpringTemplateEngine.class

It was loaded from the following location:

file:/D:/OpenSources/MyRepository/org/thymeleaf/thymeleaf-spring5/3.0.9.RELEASE/thymeleaf-spring5-3.0.9.RELEASE.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.thymeleaf.spring5.SpringTemplateEngine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
解决方案:

<properties>
<springboot-thymeleaf.version>3.0.9.RELEASE</springboot-thymeleaf.version>
<thymeleaf-layout-dialect.version>2.3.0</thymeleaf-layout-dialect.version>
</properties>
1
2
3
4
问题分析:

Here is the spring-boot-starter-thymeleaf under org.springframework.boot, use <thymeleaf.version> may conflict with org.thymeleaf do labels, resulting in the package does not get the right
--------- -------
Disclaimer: this article is the original article CSDN blogger "Mr. Mocha" and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/Mr_Mocha/article/details/97419945

Guess you like

Origin www.cnblogs.com/linwenbin/p/11441336.html