org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘deptController’: Unsatisfied dependency expressed through field ‘departmentMapper’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘departmentMapper’ defined in fileNo object can be created because
The problem is:
In springboot’s application.yml or application.properties can not use the following two configurations at the same time, in other words, only one of the two configuration methods can be taken.
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
configuration:
map-underscore-to-camel-case: true
The problem is:
In springboot’s application.yml or application.properties can not use the following two configurations at the same time, in other words, only one of the two configuration methods can be taken.
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
configuration:
map-underscore-to-camel-case: true
Solution: Comment out it.
Similar Posts:
- mybatis: Property ‘configuration’ and ‘configLocation’ can not specified with together
- [Solved] Springboot startup error: org.springframework.beans.factory.unsatisfieddependenceexception…
- [Solved] Error creating bean with name ‘xxxxController’: Unsatisfied dependency expressed through field ‘xxxxService’;
- [Solved] Error creating bean with name ‘orderController’: Unsatisfied dependency expressed through field ‘orderService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
- [Solved] Dependency injection exception: org.springframework.beans.factory.UnsatisfiedDependencyException
- [Solved] Cause: java.lang.ClassNotFoundException: Cannot find class: xxxx
- [Solved] Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.LoggerFactory
- Property ‘dataSource’ threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy
- [Solved] Spring introduces the properties variable Error: org.springframework.beans.TypeMismatchException…
- How to Solve the login error of Spring + Shiro CacheManager