Spring 如何解决一系列更改后出现的未满足的PendencyException
嗨,我是春天世界的新手,需要一些关于这个问题的想法。 在我更新了一堆文件之后,SpringWeb服务无法成功启动Spring 如何解决一系列更改后出现的未满足的PendencyException,spring,spring-mvc,Spring,Spring Mvc,嗨,我是春天世界的新手,需要一些关于这个问题的想法。 在我更新了一堆文件之后,SpringWeb服务无法成功启动 testmain应用程序是我的主引导文件 我相信根本原因来自chartServiceImpl.class]:通过构造函数参数6表示的未满足的依赖关系 但是,我还没有从secondaryChannelServiceImpl更新任何内容 有什么想法或方向来研究这类问题吗 构造器重复问题还是 at com.iicloud.goodOrg.TestMain.service.TestM
testmain应用程序
是我的主引导文件
我相信根本原因来自chartServiceImpl.class]:通过构造函数参数6表示的未满足的依赖关系代码>
但是,我还没有从secondaryChannelServiceImpl
更新任何内容
有什么想法或方向来研究这类问题吗
构造器重复问题还是
at com.iicloud.goodOrg.TestMain.service.TestMainApplication.main(TestMainApplication.java:69)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration': Unsatisfied dependency
expressed through method 'setConfigurers' parameter 0;
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'TestMainApplication':
Unsatisfied dependency expressed through field 'chartService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'chartServiceImpl' defined in file [.../charts/service/impl/chartServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 6; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'secondaryChannelServiceImpl'
由于多种原因,可能会发生未满足的Pendency异常
- 如果我们没有为特定类创建bean,或者如果我们错过了该类的@Component注释。Spring将不会管理这些类,因此Spring容器不会创建要autowire的对象
- 不属于组件扫描所含包的自动布线类。Spring将只搜索包扫描中包含的包中的组件
- 如果存在非唯一依赖项解析。如果一个接口有两个以上的实现,Spring将不知道该自动连接哪一个。这可以通过使用@Qualifier注释和@Autowired提及正确的实现来避免
将尝试您想要的这些方向。非常感谢你!