“Bean named XXX must be of type[XXX], but was actually of type[XXX]”
问题 when I integrate spring and mybatis, I encountered a error output, saying that: Bean named 'sqlSessionFactory' must be of type [org.mybatis.spring.SqlSessionFactoryBean], but was actually of type [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory] here is my code snippet: ApplicationContext context = new ClassPathXmlApplicationContext("spring_mybatis_integration/spring_config.xml"); SqlSessionFactoryBean sqlSessionFactoryBean = context.getBean("sqlSessionFactory", org.mybatis.spring