这是之前我用Spring整合mybatis的时候出过的错:Mark下。
在配置MapperScannerConfigurer的时候我配置SQLSessionFactoryBeanName,不管是maven install还是启动tomcat都会出这个错
解决方法: 应为我之前配置的mybatis.cfg.cml文件中配置的mapper.xml是只配置了一个。就没有配置package,将配置的mapper.xml文件删掉。配置package就能解决
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.apache.ibatis.session.defaults.DefaultSqlSessionFactory' to required typ