新增微服务启动报错

Blade 未结 1 99
xiaomin
xiaomin 剑者 2024-09-29 10:19

一、该问题的重现步骤是什么?

1. 新增微服务 没有引入liteflow的包 但是启动报错

2. 2024-09-29 10:16:46.392 ERROR 19032 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liteflowExecutorInit' defined in class path resource [com/yomahub/liteflow/springboot/config/LiteflowMainAutoConfiguration.class]: init flow executor cause error for path [liteflow/*.el.xml],reason: [tenantDeptRule] is not exist or [tenantDeptRule] is not registered, you need to define a node or chain with id [tenantDeptRule] and register it
 EL: THEN(tenantRule,WHEN(tenantRoleRule,tenantRoleMenuRule,tenantDeptRule,tenantPostRule,tenantDictBizRule,tenantUserRule));
                                                            ^
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:149)
    at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:59)
    at org.springblade.gr.GrApplication.main(GrApplication.java:41)
Caused by: com.yomahub.liteflow.exception.FlowExecutorNotInitException: init flow executor cause error for path [liteflow/*.el.xml],reason: [tenantDeptRule] is not exist or [tenantDeptRule] is not registered, you need to define a node or chain with id [tenantDeptRule] and register it
 EL: THEN(tenantRule,WHEN(tenantRoleRule,tenantRoleMenuRule,tenantDeptRule,tenantPostRule,tenantDictBizRule,tenantUserRule));
                                                            ^
    at com.yomahub.liteflow.core.FlowExecutor.init(FlowExecutor.java:184)
    at com.yomahub.liteflow.springboot.LiteflowExecutorInit.afterPropertiesSet(LiteflowExecutorInit.java:22)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1835)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784)
    ... 16 common frames omitted


Process finished with exit code 1

3.


二、你期待的结果是什么?实际看到的又是什么?


三、你正在使用的是什么产品,什么版本?在什么操作系统上?


四、请提供详细的错误堆栈信息,这很重要。


五、若有更多详细信息,请在下面提供。

查了只有system有引入liteflow,新增的微服务pom用了system,把system里面的liteflow去掉,新增的服务能启动 system启动不了,

1条回答
  • 2024-09-29 10:38

    新的微服务引入system目的是什么?system需要liteflow所以不能去掉。

    你需要system的内容不如直接在system上开发。新建的服务是不能再去把同等级服务当作jar包引入的,这样做是不行的,分包非常不明确还会有各种依赖引用的问题。

    0 讨论(0)
提交回复