springboot整合thymeleaf模板出现的问题

 

1.使用thymeleaf3.0.9与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文件改为:


    3.0.9.RELEASE
    2.2.2

成功解决!

最后发现自己的thymeleaf配置的视图解析器没有生效,页面无法进行跳转。

检查了发现是在controller上面加了

@ResponseBody的问题,去掉就好了,之前一直写习惯了,忘记了。

 

 

你可能感兴趣的:(springboot整合thymeleaf模板出现的问题)