Failed to convert property value of type 'org.apache.ibatis.session.defaults.DefaultSqlSessionFactory' to required type 'java.lang.String' for property 'sqlSessionFactoryBeanName';
<bean id="mySqlSessionFactoryBean" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!-- 自动扫描mapping.xml文件 -->
<property name="mapperLocations" value="classpath:com/map/UserMapper.xml"></property>
</bean>
<!-- 所在包名,Spring会自动查找其下的类 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.dao" />
<property name="sqlSessionFactoryBeanName" value="mySqlSessionFactoryBean"></property>
</bean>
之前是<property name="sqlSessionFactoryBeanName" ref="mySqlSessionFactoryBean"></property>,使用ref取不到mySqlSessionFactoryBean的值