Spring 配置Thymeleaf时出现ServletContextTemplateResolver no Matching constructor.....
来源:互联网 发布:python计算器 界面 编辑:程序博客网 时间:2024/06/18 05:42
<bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver"> <property name="prefix" value="/WEB-INF/views/" /> <property name="suffix" value=".html" /> <property name="templateMode" value="HTML5" /></bean><bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine"> <property name="templateResolver" ref="templateResolver" /></bean><bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver"> <property name="templateEngine" ref="templateEngine" /></bean>
解决办法就是替换成同样继承 虚拟类 AbstractConfigurableTemplateResolver 的类,代码如下
<bean id="templateResolver" class="org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver"> <property name="prefix" value="/WEB-INF/views/" /> <property name="suffix" value=".html" /> <property name="templateMode" value="HTML5" /></bean><bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine"> <property name="templateResolver" ref="templateResolver" /></bean><bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver"> <property name="templateEngine" ref="templateEngine" /></bean>
阅读全文
0 0
- Spring 配置Thymeleaf时出现ServletContextTemplateResolver no Matching constructor.....
- spring mvc 配置 thymeleaf
- spring 配置thymeleaf
- spring 事务配置 no matching editors or conversion strategy
- 关于 modelsim仿真时出现No objects found matching '/*'问题
- IOSXcode更新证书时出现No matching provisioning profiles found
- kotlin mybatis:No constructor found in void matching
- Spring MVC + thymeleaf 非配置
- spring-test+junit测试出现java.lang.Exception: No tests found matching
- spring配置 no matching editors or conversion strategy found 异常解决方案
- spring配置 no matching editors or conversion strategy found 异常解决方案
- spring配置 no matching editors or conversion strategy found 异常解决方案
- VC 之定义类变量时出现 no appropriate default constructor available
- Android使用广播时出现异常:java.lang.InstantiationException: class has no zero argument constructor
- Constructor argument type matching
- 在Spring中配置Thymeleaf的方法
- Spring Boot模板thymeleaf的基本配置
- springMvc配置tomcat时出现"No Spring WebApplicationInitializer types detected on classpath" 解决方法
- JAVA web基础-JDBC操作
- Java开发中的23种设计模式详解----中介者模式(Mediator)
- tomcat+nginx+redis实现均衡负载、session共享
- Java 文件打包下载 整体
- thinking in java 阅读笔记 第五章 隐藏实施过程
- Spring 配置Thymeleaf时出现ServletContextTemplateResolver no Matching constructor.....
- 初步理解组策略,Active Directory系列之二十一
- win7和win10下安装caffe和tensorflow的过程
- Oracle存储过程
- 跳跃表
- LeetCode 520:Detect Capital (c++)
- 如何通过源码修改手机型号等信息
- thinkphp单独连接一个数据库
- 设计模式之模板方法模式