错误:
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
出现错误的原因:
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<!-- 会话工厂 -->
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactoryBean"/>
上面property中value修改为了ref,就会报出错误,正确的写法应该是使用value属性