SpringBoot切换Thymeleaf模板引擎版本及对应布局版本

Use Thymeleaf 3 官方文档


  3.0.9.RELEASE
          
       
  2.3.0
***************************
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

解决方案:


    3.0.9.RELEASE
    2.3.0

问题分析:

这里用的是org.springframework.boot下的spring-boot-starter-thymeleaf,使用做标签时可能与org.thymeleaf有冲突,导致包获取不正确

原文链接:https://blog.csdn.net/Mr_Mocha/article/details/97419945

你可能感兴趣的:(SpringBoot)