Project scenario:
springboot project, unable to create bean object and inject dependency
Problem Description:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'adminService':
Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
'adminMapper' defined in file [E:\IdeaCode\toyrentalplatform\target\classes\cn\gestwr\toy\dao\AdminMapper.class]: Unsatisfied dependency expressed through bean property
'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException:
Cause analysis:
It is the configuration file application Properties
Solution:
the configuration options of the configuration file are wrong, for example, the following configuration is added and an error is reported
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
In the properties file, the color of this configuration is different from that of other configurations. The correct one is light green
Note the format of the YML configuration file