简体   繁体   English

Bean名称不满意的依赖项异常通过字段表示的不满意的依赖性

[英]UnsatisfiedDependencyException Error with bean name Unsatisfied dependency expressed through field

I'm a novice using a microservice architecture and want to access a bean from another module which uses camunda (a read only business process tool (library)). 我是使用微服务架构的新手,并且想要从另一个使用camunda(只读业务流程工具(库))的模块访问Bean。 The error unsatisfied dependency is coming from a camunda interface yet I don't require any bean from camunda in my current module so i tried to exclude it with the code below: 错误未满足的依赖关系来自camunda接口,但是我在当前模块中不需要来自camunda的任何bean,因此我尝试使用以下代码将其排除:

@Configuration
@ComponentScan(basePackages = {"com.example"}, excludeFilters={
 @ComponentScan.Filter(type=FilterType.ASSIGNABLE_TYPE, value=SpringProcessEngineServicesConfiguration.class)}) 

The current module won't start giving the stacktrace below: 当前模块将不会开始提供以下stacktrace:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.camunda.bpm.engine.spring.SpringProcessEngineServicesConfiguration': Unsatisfied dependency expressed through field 'processEngine': Error creating bean with name 'processEngineFactoryBean': FactoryBean threw exception on object creation; nested exception is org.camunda.bpm.engine.exception.NotValidException: Filter name must not be null or empty: name is null; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineFactoryBean': FactoryBean threw exception on object creation; nested exception is org.camunda.bpm.engine.exception.NotValidException: Filter name must not be null or empty: name is null

My solution was simple although it took a long time to solve. 我的解决方案很简单,尽管花了很长时间才能解决。 I managed to solve it with the code below: 我设法用下面的代码解决了:

<exclusions>
    <exclusion>
        <groupId>org.camunda.blablabla</groupId>
        <artifactId>*</artifactId>
    </exclusion>
</exclusions>

All needed to do was to exclude all the camunda dependencies in the module dependency section. 所有需要做的就是在模块依赖项部分中排除所有camunda依赖项。 Silly me! 傻我!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UnsatisfiedDependencyException:创建名为“procjectController”的 bean 时出错:通过字段表达的不满足的依赖关系 - UnsatisfiedDependencyException: Error creating bean with name 'procjectController': Unsatisfied dependency expressed through field UnsatisfiedDependencyException:创建名为“homeController”的 bean 时出错:通过字段“dao”表示不满足的依赖关系 - UnsatisfiedDependencyException: Error creating bean with name 'homeController': Unsatisfied dependency expressed through field 'dao' UnsatisfiedDependencyException:创建名称为“trackiHuntServiceImpl”的 bean 时出错:通过字段“deviceService”表示不满足的依赖关系 - UnsatisfiedDependencyException: Error creating bean with name 'trackiHuntServiceImpl': Unsatisfied dependency expressed through field 'deviceService' UnsatisfiedDependencyException:创建名为“studentConrroller”的 bean 时出错:通过字段“studentserv”表达的不满意依赖; - UnsatisfiedDependencyException: Error creating bean with name 'studentConrtroller': Unsatisfied dependency expressed through field 'studentserv'; 使用名称创建 bean 时出错:通过字段表示的不满足依赖关系 - Error creating bean with name : Unsatisfied dependency expressed through field JAVA:创建带有名称的 bean 时出错; 通过字段表达的不满意依赖 - JAVA: Error creating bean with name; Unsatisfied dependency expressed through field 创建通过字段 sessionFactory 表示的 bean 不满足的依赖项时出错 - Error creating bean unsatisfied dependency expressed through field sessionFactory 创建 bean 时出错; 通过字段表达的不满意依赖 - Error creating bean; Unsatisfied dependency expressed through field 为什么会出现错误“创建名称为&#39;***&#39;的bean时出错:通过字段&#39;***&#39;表示的不满意依赖性” - Why Getting error “Error creating bean with name '***': Unsatisfied dependency expressed through field '***'” Spring Boot错误:创建名称为“ albumController”的bean时出错:通过字段“ albumService”表示的不满意的依赖性 - Spring Boot error: Error creating bean with name 'albumController': Unsatisfied dependency expressed through field 'albumService'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM