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 file [D:\demo16\target\classes\com\example\demo\mapper\DepartmentMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactory’ threw exception; nested exception is java.io.FileNotFoundException: class path resource [mybatis/mybaties-config.xml] cannot be opened because it does not exist
Error situation analysis.
1. mapping xml file in the namespace and resultType full class name attention to the correct reference.
2. yml file mybatis config and mapper address note that the best direct reference, not hand-typed.
Read More:
- Cannot resolve reference to bean ‘sqlSessionFactory‘ while setting bean property ‘sqlSessionFactory‘
- [Solved] Error creating bean with name ‘accountService‘: Unsatisfied dependency expressed through field
- Error creating bean with name ‘adminMapper‘ Injection of resource dependencies failed
- Springboot integration shiro error: UnsatisfiedDependencyException: Error creating bean with name ‘getShiroFilterFact
- [Solved] Mybatis add dependencies Error: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.
- [Solved] nacos Startup Error: nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error
- Spring Project Error: Error creating bean with name [How to Solve]
- [Solved] Springboot Error: Error creating bean with name ‘xxxController‘
- Spring interdependence error: beancurrentyincreationexception unsatisfieddependencyexception
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org
- [Solved] BeanCreationException: Error creating bean with name ‘configurationPropertiesBeans‘
- [Solved] Springboot Error: Error creating bean with name ‘dataSource‘ defined in class path resource
- [Solved] Springboot error: Could Not Found xxmapper
- [Solved] Rabbitmq injection failed, bean creation failed, error creating bean with name ‘rabbitconnectionfactory’‘
- Request processing failed; nested exception is java.lang.NullPointerException or UnsatisfiedDependencyE
- [Solved] ssm Error: Error creating bean with name ‘employeeController’: Injection of autowired dependencies failed
- [Solved] Spring jdbctemplate Error: ‘Java. SQL. Driver’ for property ‘driver’: no
- [Solved] In case of “transactionmanager” while setting bean property “transactionmanager” error
- o.s.boot.SpringApplication, Error creating bean with name ‘paymentImpl‘, xml Configuration file error
- [Solved] nested exception is org.flowable.common.engine.api.FlowableException: Error initialising dmn data mo