setConfigLocation()方法報錯
sqlSessionFactoryBean.setConfigLocation(new ClassPathResource(mybatisConfigFile));
這一行報錯:
The type org.apache.ibatis.session.SqlSessionFactory cannot be resolved. It is indirectly referenced from required .class files
sqlSessionFactoryBean.setConfigLocation(new ClassPathResource(mybatisConfigFile));
這一行報錯:
The type org.apache.ibatis.session.SqlSessionFactory cannot be resolved. It is indirectly referenced from required .class files
2018-09-17
舉報
2018-09-18
你的pom.xml的依賴都對了嗎?你重新檢查下你的依賴,還有對應的版本號
2018-09-18
對了,修改了這里的版本號,原來是2.0的版本,現在不報錯了。謝謝。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>