easybest / spring-data-mybatis

Simplifies the development of creating a MyBatis-based data access layer.
https://sdm.easybest.io
Apache License 2.0
237 stars 73 forks source link

Circular dependencies between sqlSessionFactory and dataSourceInitializer #102

Closed freemanpolys closed 7 years ago

freemanpolys commented 7 years ago

Hi,

I have this issue when adding spring-boot-starter-data-mybatis dependency in Spring Boot 1.5.1.RELEASE.

`


APPLICATION FAILED TO START


Description:

The dependencies of some of the beans in the application context form a cycle:

springDataMybatisApplication (field com.example.mapper.MyUserMapper com.example.SpringDataMybatisApplication.myUserMapper) ↓ myUserMapper defined in file [/Users/sar/Documents/Projets/James-SpringBoot-Sandbox/spring-data-mybatis/target/classes/com/example/mapper/MyUserMapper.class] ┌─────┐ | sqlSessionFactory defined in class path resource [org/springframework/data/mybatis/autoconfiguration/MybatisRepositoriesAutoConfiguration.class] ↑ ↓ | dataSource defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class] ↑ ↓ | dataSourceInitializer └─────┘ `

easybest commented 7 years ago

can you show me your pom.xml?