IDEA开发springboot遇到的问题:org.thymeleaf.spring5.SpringTemplateEngine.setRenderHiddenMarkersBeforeCheckbo
2020-04-20 19:04
477 查看
1.出错情况
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:/E:/springboot/repository/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:/E:/springboot/repository/org/thymeleaf/thymeleaf-spring5/3.0.9.RELEASE/thymeleaf-spring5-3.0.9.RELEASE.jar
2.出错原因:这种错误有可能是thymeleaf版本不匹配造成的
(1). 我之前创建springboot项目的时候用的是如下的thymeleaf版本
<properties> <java.version>1.8</java.version> <thymeleaf.version>3.0.9.RELEASE</thymeleaf.version> <!-- 布局功能的支持程序 thymeleaf3主程序 layout2以上版本 --> <!-- thymeleaf2 layout1--> <thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version> </properties> //以下内容与版本无关 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>
这种错误是由与thymeleaf.version与thymeleaf-layout-dialect.version的版本冲突造成的,
布局功能的支持程序 thymeleaf3主程序 layout2以上版本或者thymeleaf2对应layout1。但是其实这句话是有问题的,具体的版本匹配我们需要查看官网才能知道。。。。但是我目前也不清楚这个具体版本匹配在哪里查询。
因为现在的3.0.9与2.2.2已经不匹配,所以我们需要修改一下版本,只要版本匹配就行。请看下一节修改后的测试结果
(2). 修改版本后
<properties> <java.version>1.8</java.version> <thymeleaf.version>3.0.11.RELEASE</thymeleaf.version> <!-- 布局功能的支持程序 thymeleaf3主程序 layout2以上版本 --> <!-- thymeleaf2 layout1--> <thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version> </properties>
我这里把修改成了3.0.11,此时我的测试结果就对了,如下
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- 在idea里使用SpringBoot整合MyBatis时遇到的Mapper扫描不到的问题
- idea spring boot打包jar 遇到的一个问题 spring boot dubbo Could not resolve dependencies for project
- idea+springboot+ thymeleaf+ajax遇到的问题
- 【小白】记使用idea创建一个springboot project所遇到的问题
- 使用idea学习SpringBoot整合Mybatis,遇到mapper无法注入的问题
- intellij idea maven springMVC和SpringBoot遇到的两个小问题
- (二十三)IDEA 构建一个springboot工程,以及可能遇到的问题
- idea学习(一):新建springboot项目,初步前端显示,遇到Path with "WEB-INF" or "META-INF": [WEB-INF/jsp/**.jsp]问题,很坑
- idea开发springboot 写html不会刷新的问题,这个是手动刷新的
- IDEA创建一个spring-boot整合Mybatis的模块时,遇到的问题
- IDEA上面搭建一个SpringBoot的web-mvc项目遇到的问题
- IDEA开发springboot项目遇到的properties文件乱码以及??login.username_zh_CN??乱码解决办法
- 插件开发中与spring集成遇到的问题
- springboot打包jar ,war遇到的问题。
- spring-boot框架开发的系统读取到的数据库数据相差8小时的问题解决
- springboot 开发入门,及问题汇总
- 自学SpringBoot时遇到的一些问题
- spring boot + dubbo开发遇到过的异常
- Idea开发工具 导入spring_boot测试项目例子报错
- idea 开发spring boot应用程序