Spring+mybatis+SpringMVC整合发生异常:org.springframework.beans.ConversionNotSupportedException
来源:互联网 发布:中老年春秋连衣裙淘宝 编辑:程序博客网 时间:2024/05/01 05:23
错误:
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.apache.ibatis.session.defaults.DefaultSqlSessionFactory' to required type 'Java.lang.String' for property 'sqlSessionFactoryBeanName'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory] to required type [java.lang.String] for property 'sqlSessionFactoryBeanName': no matching editors or conversion strategy found
原因:
<property name="sqlSessionFactoryBeanName" ref="sqlSessionFactoryBean"/>
解决:
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<!-- 会话工厂 -->
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactoryBean"/>
将property中ref修改为了value,正确的写法应该是使用value属性!
- 顶
- 2
- 踩
- Spring+mybatis+SpringMVC整合发生异常:org.springframework.beans.ConversionNotSupportedException
- SSM 运行时发生异常:org.springframework.beans.ConversionNotSupportedException:
- java异常:org.springframework.beans.ConversionNotSupportedException
- org.springframework.beans.ConversionNotSupportedException异常解决方法
- org.springframework.beans.ConversionNotSupportedException:
- org.springframework.beans.ConversionNotSupportedException
- SpringMVC+Mybatis+Spring整合中org.springframework.beans.factory.BeanCreationException错误分析
- spring异常org.springframework.beans.factory.NoSuchBeanDefinitionException
- nested exception is org.springframework.beans.ConversionNotSupportedException的解决方法
- 整合Spring和Mybatis 中org.springframework.beans.factory.BeanCreationException错误
- SpringMvc常见异常之org.springframework.beans.factory.NoSuchBeanDefinitionException
- 关于Spring中org.springframework.beans.factory.UnsatisfiedDependencyException异常
- Spring中org.springframework.beans.factory.UnsatisfiedDependencyException异常
- spring异常解决方法:org.springframework.beans.factory.BeanCreationNotAllowedException
- Spring容器初始化异常:org.springframework.beans.factory.BeanDefinitionStoreException
- 异常信息:spring mvc org.springframework.beans.NullValueInNestedPathException错误
- spring boot-部署时报org.springframework.beans.factory.BeanCreationNotAllowedException异常
- spring启动异常:org.springframework.beans.factory.BeanCreationException
- SQL 知识及用法备忘录
- 宏定义
- 再谈volatile关键字
- linux(一)之linux简介
- hadoop-wordcount
- Spring+mybatis+SpringMVC整合发生异常:org.springframework.beans.ConversionNotSupportedException
- qt之输出日志到文件中
- 变态跳台阶
- 程序调试:mfcvc01 Microsoft基础类应用程序已停止工作
- Georgia and Bob POJ
- Spring Boot maven配置环境部署及定义相关属性
- Servlet向JSP传值
- MyBatis使用注解进行开发
- LightOJ-1012-Guilty Prince [DFS]