当使用camunda spring boot设置EmbeddedServletContainerFactory时,ProcessEngine bean会丢失

时间:2017-01-25 01:53:42

标签: spring-boot camunda

当我使用camunda流程引擎(使用camunda-bpm-spring-boot-starter)将以下bean添加到Spring启动时:

    @Bean
public EmbeddedServletContainerFactory servletContainerFactory() {
    return new TomcatEmbeddedServletContainerFactory() {

        @Override
        protected TomcatEmbeddedServletContainer getTomcatEmbeddedServletContainer(
                Tomcat tomcat) {

我得到以下内容:

 Spring-Boot:  (v1.4.3.RELEASE)
  Camunda BPM: (v7.6.0)
  Camunda BPM Spring Boot Starter: (v2.0.0)

2017-01-25 12:44:31.693  INFO 6816 --- [           main] au.com.nukon.ManufacturingApplication    : Starting ManufacturingApplication on DESKTOP-K6SH5B5 with PID 6816 (C:\Data\BonitaRedDowntimePOC\Camunda\manufacturing\target\classes started by R in C:\Data\BonitaRedDowntimePOC\Camunda\manufacturing)
2017-01-25 12:44:31.697  INFO 6816 --- [           main] au.com.nukon.ManufacturingApplication    : No active profile set, falling back to default profiles: default
2017-01-25 12:44:31.780  INFO 6816 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5aebe890: startup date [Wed Jan 25 12:44:31 AEDT 2017]; root of context hierarchy
2017-01-25 12:44:33.342  INFO 6816 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'dataSource' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Dbcp; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Dbcp.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Tomcat; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]]
2017-01-25 12:44:33.755  INFO 6816 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-01-25 12:44:33.895  INFO 6816 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$56486ce9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-01-25 12:44:33.973  WARN 6816 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'manufacturingApplication': Unsatisfied dependency expressed through field 'processEngine'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.camunda.bpm.engine.ProcessEngine' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2017-01-25 12:44:34.053 ERROR 6816 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field processEngine in au.com.nukon.ManufacturingApplication required a bean of type 'org.camunda.bpm.engine.ProcessEngine' that could not be found.


Action:

Consider defining a bean of type 'org.camunda.bpm.engine.ProcessEngine' in your configuration.

任何想法?我的目标是能够在我的应用程序中添加额外的war webapp。

0 个答案:

没有答案