546 Star 5.9K Fork 1.4K

GVPdromara / liteFlow

 / 详情

希望增加对SpringBoot 1.5.x版本的兼容适配,

已完成
创建于  
2021-05-11 11:10

使用样例工程:
https://gitee.com/bryan31/liteflow-example
将SpringBoot版本号换为1.5.6后,SpringBoot直接启动失败。

错误信息如下:

Connected to the target VM, address: '127.0.0.1:21160', transport: 'socket'

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.6.RELEASE)

2021-05-11 10:42:05.294  INFO 6020 --- [           main] com.shtel.flow.IotMainApp                : Starting IotMainApp on DESKTOP-HJK1IBI with PID 6020 (D:\IdeaProject\MMCS-SpringSesion-API\liteflow-demo\target\classes started by Shmily in D:\IdeaProject\MMCS-SpringSesion-API)
2021-05-11 10:42:05.302  INFO 6020 --- [           main] com.shtel.flow.IotMainApp                : No active profile set, falling back to default profiles: default
2021-05-11 10:42:05.581  INFO 6020 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@50dfbc58: startup date [Tue May 11 10:42:05 CST 2021]; root of context hierarchy
2021-05-11 10:42:12.194  INFO 6020 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.yomahub.liteflow.springboot.LiteflowComponentScannerAutoConfiguration' of type [com.yomahub.liteflow.springboot.LiteflowComponentScannerAutoConfiguration$$EnhancerBySpringCGLIB$$8acbef96] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-05-11 10:42:41.482  INFO 6020 --- [           main] com.yomahub.liteflow.util.LOGOPrinter    : 
================================================================================================
		 _     ___ _____ _____      _____ _     _____        __
		| |   |_ _|_   _| ____|    |  ___| |   / _ \ \      / /
		| |    | |  | | |  _| _____| |_  | |  | | | \ \ /\ / / 
		| |___ | |  | | | |__|_____|  _| | |__| |_| |\ V  V /  
		|_____|___| |_| |_____|    |_|   |_____\___/  \_/\_/   

		做最轻量级,最实用的微流程框架
		To be the most lightweight and the most practical micro-process framework
================================================================================================

2021-05-11 10:42:41.504  WARN 6020 --- [           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.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.AbstractMethodError
2021-05-11 10:42:41.533  INFO 6020 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2021-05-11 10:42:41.564 ERROR 6020 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.AbstractMethodError
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) ~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at com.shtel.flow.IotMainApp.main(IotMainApp.java:12) [classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.AbstractMethodError
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:479) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:199) ~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:162) ~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134) ~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	... 8 common frames omitted
Caused by: java.lang.AbstractMethodError: null
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1037) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1011) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:473) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	... 15 common frames omitted

Disconnected from the target VM, address: '127.0.0.1:21160', transport: 'socket'

Process finished with exit code 1

评论 (1)

归期 创建了任务
归期 关联仓库设置为dromara/liteFlow
展开全部操作日志

使用SpringBoot 1.5.x的使用方法如下:
1)配置文件移除组件扫描自动配置

spring:
  autoconfigure:
    exclude: com.yomahub.liteflow.springboot.LiteflowComponentScannerAutoConfiguration

2)增加自定义组件扫描器

import com.yomahub.liteflow.spring.ComponentScanner;
import org.springframework.beans.BeansException;
import org.springframework.beans.PropertyValues;

import java.beans.PropertyDescriptor;

public class LiteFlowComponentScanner extends ComponentScanner {
    @Override
    public Object postProcessBeforeInstantiation(Class<?> aClass, String s) throws BeansException {
        return null;
    }

    @Override
    public boolean postProcessAfterInstantiation(Object o, String s) throws BeansException {
        return true;
    }

    @Override
    public PropertyValues postProcessPropertyValues(PropertyValues propertyValues, PropertyDescriptor[] propertyDescriptors, Object o, String s) throws BeansException {
        return propertyValues;
    }
}

3)启用自定义组件扫描器

@Configuration
public class LiteFlowConfig {
    @Bean("componentScanner")
    public LiteFlowComponentScanner componentScaner() {
        return new LiteFlowComponentScanner();
    }
}
zendwang 负责人设置为zendwang
zendwang 任务状态待办的 修改为进行中
zendwang 添加了
 
enhancement
标签
zendwang 关联分支设置为v2.5.5
铂赛东 任务状态进行中 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
5663504 returntime 1667368457
Java
1
https://gitee.com/dromara/liteFlow.git
git@gitee.com:dromara/liteFlow.git
dromara
liteFlow
liteFlow

搜索帮助