使用SpringMVC报错 Error creating bean with name 'conversionService' defined in class path resource [springmvc.xml]
使用SpringMVC报错 Error creating bean with name 'conversionService' defined in class path resource [springmvc.xml]
Could not instantiate bean class [org.springframework.core.convert.support.ConversionServiceFactory]:
Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'conversionService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'conversionService' defined in class path resource [springmvc.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.core.convert.support.ConversionServiceFactory]: Is it an abstract class?; nested exception is java.lang.InstantiationException。
仔细检查是springmvc.xml中的bean中的class引入错误的类了。比如原来是这样的:
<bean id="conversionService"
class="org.springframework.core.convert.support.ConversionServiceFactory">
<property name="converters">
<set>
<ref bean="employeeConverter"/>
</set>
</property>
</bean>
正确的应该下面这样
<bean id="conversionService"
class="org.springframework.context.support.ConversionServiceFactoryBean">
<property name="converters">
<set>
<ref bean="employeeConverter"/>
</set>
</property>
</bean>
修改成这样就不会报错了。
使用SpringMVC报错 Error creating bean with name 'conversionService' defined in class path resource [springmvc.xml]的更多相关文章
- java数据库执行迁移报错Error creating bean with name 'flywayInitializer' defined in class path resource
报错原因 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayI ...
- idea报错 Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource
核对一下控制器是不是写了相同的路径...org.springframework.beans.factory.BeanCreationException: Error creating bean wit ...
- SpringBoot启动zipkin-server报错Error creating bean with name ‘armeriaServer’ defined in class path resource
目前,GitHub 上最新 release 版本是 Zipkin 2.12.9,从 2.12.6 版本开始有个较大的更新,迁移使用 Armeria HTTP 引擎. 从此版本开始,若直接添加依赖的 S ...
- Error creating bean with name 'mapper' defined in class path resource [applicationcontext.xml]: Cannot resolve reference to bean 'factory' while setting bean property 'sqlSessionFactory'; nested excep
Error creating bean with name 'mapper' defined in class path resource [applicationcontext.xml]: Cann ...
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; neste
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stu' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stu' defined ...
- aused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method fai
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleDaoImpl' ...
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable t
spring与hibernate整合然后出现如下错误: org.springframework.beans.factory.BeanCreationException: Error creating ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deptDao_a' defined in class path resource [beansAndHibernate.xml]: Cannot resolve reference to bean 'sessionFact
Error creating bean with name 'deptDao_a' defined in class path 因为更改了类的名字,所以其setter方法没有更改,需要 private ...
随机推荐
- About AcitveDirectory EventLog
参考微软文档整理的常用EVENTID: Account Logon Account Management Policy Change Event ID Event message 分類 類別 4670 ...
- MVC异步消息推送机制
在MVC里面,有异步控制器,可以实现模拟消息推送机制功能 1.控制器要继承至AsyncController,如 public class RealTimeController : AsyncContr ...
- sqlalchemy笔记
http://jzqt.github.io/2015/12/29/SQLAlchemy%E7%AC%94%E8%AE%B0/ 用SQLAlchemy做ORM也有一段时间了,总结一下用过的一些地方. 连 ...
- json/pickle/shelve/xml/configparser/hashlib/subprocess - 总结
序列化:序列化指把内存里的数据类型转成字符串,以使其能存储到硬盘或通过网络传输到远程,因为硬盘或网络传输时只能接受bytes为什么要序列化:可以直接把内存数据(eg:10个列表,3个嵌套字典)存到硬盘 ...
- JS改变HTML元素的绝对坐标
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DT ...
- Android “swipe” vs “fling”
onFling will get executed when a user makes a "fling" motion, and said motion has a veloci ...
- java 程序cpu100%问题
找到java应用进程 ID即 java_id 找到该 java_id对应的CPU占用比较大的线程 ID即 thread_id 使用jdk自带jstack工具打印跟该线程相关的堆栈信息 [root@pv ...
- MySQL 数据备份,Pymysql模块(Day47)
阅读目录 一.IDE工具介绍 二.MySQL数据备份 三.Pymysql模块 一.IDE工具介绍 生产环境还是推荐使用mysql命令行,但为了方便我们测试,可以使用IDE工具 下载链接:https:/ ...
- C#驱动级模拟按键操作
C#驱动级模拟按键操作 2013-09-26 03:17 ·AB叔 447 3 <- 点击左侧的数字“攒”一个吧 昨天遇到一个程序自动输入财付通密码的任务. 因为财付通密码控件是有安全保护的,所 ...
- 谷歌Project Fi服务(转)
问:谷歌推出的移动虚拟网络Project Fi到底是什么呀? 答:谷歌手里有很多张“牌”可以出,现在这家搜索巨头又将目标放在了无线产业.在美国,移动电信合约服务是AT&T, Verizon, ...