springboot-mybatis遇到的bug
1、[bug]Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’;
- 项目场景:
springboot整合mybatis时,将xxxMapper.xml 放在resources目录下,这时候运行报错如下:Unsatisfied dependency expressed through method ‘sqlSessionFactory’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration $Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method ‘dataSource’ threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$Dat