老师,启动SpringBoot失败报UnsatisfiedDependencyException异常 Error creating bean

来源:5-4 搭建Springboot分层项目

雪山和海

2022-02-10

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2022-02-10 13:49:35,175 [main] [org.springframework.boot.SpringApplication.reportFailure(SpringApplication.java:834)] - [ERROR] Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘bgmController’: Unsatisfied dependency expressed through field ‘bgmService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘bgmServiceImpl’: Unsatisfied dependency expressed through field ‘bgmMapper’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘bgmMapper’ defined in file [D:\JavaProject\video-dev\video-dev-mapper\target\classes\com\imooc\mapper\BgmMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [tk/mybatis/mapper/autoconfigure/MapperAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘sqlSessionFactory’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSou

写回答

1回答

风间影月

2022-02-10

数据源 mapper都问题额,是直接复制所有代码运行的吗?

0
3
雪山和海
回复
风间影月
好的,我重新改一下
2022-02-10
共3条回复

Spring Boot短视频小程序开发 全栈式实战项目

一门课程带你搞定短视频小程序全栈开发,毕业设计之利器!

2618 学习 · 1956 问题

查看课程