我使用的是SpringV1。4.0.释放我得到一个异常“org.springframework.beans.factory.unsatifiedpendencyException:创建名为“trackiHuntServiceImpl”的bean时出错:通过字段“deviceService”表示的未满足的依赖关系”。其方案是多模块的。
我列出了主要的课程代码:
@Import({PrimaryRepositoryConfig.class,
AuditRepositoryConfig.class,
PaypalConfig.class,
BraintreeConfig.class,
CommonConfig.class,
ElasticsearchConfig.class
})
@ComponentScan(basePackages ={"com.trackimo.server.model" ,
"com.trackimo.server.dao",
"com.trackimo.server.services",
"com.trackimo.server.services.account",
"com.trackimo.server.services.email",
"com.trackimo.server.services.common",
"com.trackimo.server.services.location",
"com.trackimo.server.services.user",
"com.trackimo.server.services.trackihunt",
"com.trackimo.server.services.device",
"com.trackimo.server.audit.model",
"com.trackimo.server.audit.dao",
"com.trackimo.server.utils.converters",
"com.trackimo.server.worker",
"com.trackimo.quartz.config"},
excludeFilters = @ComponentScan.Filter(IgnoreDuringScan.class)
)
@SpringBootApplication(exclude = { DispatcherServletAutoConfiguration.class })
@EnableScheduling
@EnableAsync
public class QuartzApplication {
public static void main(String[] args) {
SpringApplication.run(QuartzApplication.class, args);
}
}
2019-10-11 16:57:37,072 [main] ERROR o.s.boot.SpringApplication - Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'trackiHuntServiceImpl': Unsatisfied dependency expressed through field 'deviceService': Error creating bean with name 'deviceServiceImpl': Unsatisfied dependency expressed through field 'emailService': Error creating bean with name 'emailServiceImpl': Unsatisfied dependency expressed through field 'eMailMessageSender': No qualifying bean of type [com.trackimo.server.services.email.DynamicEmailService] found for dependency [com.trackimo.server.services.email.DynamicEmailService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.trackimo.server.services.email.DynamicEmailService] found for dependency [com.trackimo.server.services.email.DynamicEmailService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'emailServiceImpl': Unsatisfied dependency expressed through field 'eMailMessageSender': No qualifying bean of type [com.trackimo.server.services.email.DynamicEmailService] found for dependency [com.trackimo.server.services.email.DynamicEmailService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.trackimo.server.services.email.DynamicEmailService] found for dependency [com.trackimo.server.services.email.DynamicEmailService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'deviceServiceImpl': Unsatisfied dependency expressed through field 'emailService': Error creating bean with name 'emailServiceImpl': Unsatisfied dependency expressed through field 'eMailMessageSender': No qualifying bean of type [com.trackimo.server.services.email.DynamicEmailService] found for dependency [com.trackimo.server.services.email.DynamicEmailService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.trackimo.server.services.email.DynamicEmailService] found for dependency [com.trackimo.server.services.email.DynamicEmailService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'emailServiceImpl': Unsatisfied dependency expressed through field 'eMailMessageSender': No qualifying bean of type [com.trackimo.server.services.email.DynamicEmailService] found for dependency [com.trackimo.server.services.email.DynamicEmailService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.trackimo.server.services.email.DynamicEmailService] found for dependency [com.trackimo.server.services.email.DynamicEmailService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Spring无法创建bean trackiHuntServiceImpl,因为它无法创建bean deviceServiceImpl,因为它无法创建bean emailServiceImpl,因为它依赖于它未定义的DynamicEmail Service类型的bean eMailMessageSender。
基本上,您必须定义DynamicMailService类型的bean。当您解决这个问题时,可能还会缺少其他定义。祝你好运
创建名称为clienteRestController的bean时出错:通过字段clientService表示的不满意的依赖项。 创建名称为'clientServiceImpl'的bean时出错:通过字段'client道'表示的不满意的依赖项。 创建名称为ICliente道的bean时出错:初始化方法调用失败。 嵌套异常java.lang.IllegalArgumentExcishop:不是托管类型
我有以下代码和结构。我得到以下错误,这是很长的错误消息。 创建名称为'departmentController'的bean时出错:通过字段'departmentService'表示的不满意的依赖项;嵌套异常org.springframework.beans.factory.不满意依赖异常: 实体类 存储库接口 服务等级 控制器类 主课 项目结构 完整错误堆栈跟踪:
当我试图进入主页时,我有以下错误 在我的UserController中,我有以下代码 我的用户服务 我的UserServiceImpl 我的假设 web.xml 我的servlet上下文 根上下文为空。 我不知道哪里是可能的错误原因,我试图找到不同的选项,但如果我使用DAO模式,我会收到相同的错误,所以我想知道哪个是问题来解决它。 该项目的配置使用xml,但我认为解决这种情况并不重要。 问候!
我是Spring和hibernate框架的新手,我已经给出了依赖项上的注释,但是我不知道为什么会出现这个错误。 创建名为“customerController”的bean时出错:通过字段“customerDAO”表示的未满足的依赖关系;嵌套的异常是org。springframework。豆。工厂未满足的依赖项异常:创建名为“customerDAOImpl”的bean时出错:未满足的依赖项通过字段“
以下是跟踪: org.springframework.beans.factory.未满足的DependencyException:创建名称为'testController'的bean时出错:通过字段'testDAO'表示的依赖项未满足;嵌套异常org.springframework.beans.factory.BeanCreationException:创建名称为'testDAO'的bean时出错
我是sping-mvc的新手。我试图找到使用sping-mvc、hiberNate、mysql和jsf开发测试项目的好教程。最后我创建了示例项目。 我的第一个问题是, 就是这个Spring-mvc结构 但不幸的是,上面显示的是错误。 应用程序上下文。xml 人脸配置。xml web.xml 个人类 PersonDAOImpl类 个人服务Impl类 ManagedBeanClass类 错误是, 请给