How to Solve Springboot use thymeleaf template error

When using the thymeleaf template for the first time, the following error is reported when starting:

The following method did not exist: 
org.thymeleaf.spring5.SpringTemplateEngine.setRenderHiddenMarkersBeforeCheckboxes(Z)V

The reason for this error is that the version of springboot is incompatible with the version of thymeleaf template. Add the following content to the <properties> tag:

<thymeleaf-spring5.version>3.0.9.RELEASE</thymeleaf-spring5.version>
<thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>

After adding, you can start springboot

Read More: