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:
- [Solved] Error creating bean with name ‘accountService‘: Unsatisfied dependency expressed through field
- Springboot integration shiro error: UnsatisfiedDependencyException: Error creating bean with name ‘getShiroFilterFact
- [Solved] Springboot Error: Error creating bean with name ‘xxxController‘
- [Solved] Springboot integrate swagger error: Failed to start bean ‘documentationPluginsBootstrapper‘
- [Solved] Springboot Error: Error creating bean with name ‘dataSource‘ defined in class path resource
- Springboot mybatis Integrate Error: Invalid bound statement (not found): com…DepartmentMapper.save
- Error creating bean with name ‘adminMapper‘ Injection of resource dependencies failed
- [Solved] Unsatisfied dependency expressed through field ‘restTemplate’;
- [Solved] SpringBoot Startup Error: org.springframework.beans.factory.UnsatisfiedDependencyException Error creating
- SpringBoot integrates Es error: Error creating bean with name ‘restHighLevelClient‘ defined in class path resource
- Springboot Integrate Swagger2 Error: Failed to start bean ‘documentationPluginsBootstrapper‘;
- [Solved] Springboot integrate swagger error: failed to start bean ‘documentationpluginsbootstrapper‘
- [Solved] springboot Error: Error creating bean with name ‘configurationPropertiesBeans‘ defined in class path
- [Solved] Rabbitmq injection failed, bean creation failed, error creating bean with name ‘rabbitconnectionfactory’‘
- jasypt springboot Error: Error creating bean with name ‘enableEncryptablePropertySourcesPostProcessor’ defined in class path resource
- SpringBoot Integrating elasticsearch Error: Error creating bean with name ‘restHighLevelClient‘
- Cannot resolve reference to bean ‘sqlSessionFactory‘ while setting bean property ‘sqlSessionFactory‘
- [Solved] Spring AOP Error creating bean with name
- [Solved] BeanCreationException: Error creating bean with name ‘configurationPropertiesBeans‘
- o.s.boot.SpringApplication, Error creating bean with name ‘paymentImpl‘, xml Configuration file error