1.使用thymeleaf3.0.9与<thymeleaf-layout-dialect.version>2.2.2,但是出现了以问题 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:
看了网上的解决方案:
pom文件改为:
<properties> <thymeleaf-spring5.version>3.0.9.RELEASE</thymeleaf-spring5.version> <thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version> </properties>
成功解决!
最后发现自己的thymeleaf配置的视图解析器没有生效,页面无法进行跳转。
检查了发现是在controller上面加了
@ResponseBody的问题,去掉就好了,之前一直写习惯了,忘记了。