xxljob执行器整合到业务实例中启动报错

Blade 已结 2 606
zxjsn01
zxjsn01 剑者 2023-03-29 13:11
悬赏:10

image.png

image.png

image.png



org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springblade.edo.base.enterprises.enterprise.feign.EnterprisePeripheralClient': Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException: Method has too many Body parameters: public abstract org.springblade.core.tool.api.R org.springblade.edo.base.enterprises.enterprise.feign.EnterprisePeripheralClient.deleteEnterprise(java.lang.String,java.lang.String,java.lang.String,java.lang.String)

Warnings:

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1109)

at com.xxl.job.core.executor.impl.XxlJobSpringExecutor.initJobHandlerMethodRepository(XxlJobSpringExecutor.java:87)

at com.xxl.job.core.executor.impl.XxlJobSpringExecutor.afterSingletonsInstantiated(XxlJobSpringExecutor.java:38)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:914)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)

at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)

at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:50)

at org.springblade.edo.BaseApplication.main(BaseApplication.java:35)

Caused by: java.lang.IllegalStateException: Method has too many Body parameters: public abstract org.springblade.core.tool.api.R org.springblade.edo.base.enterprises.enterprise.feign.EnterprisePeripheralClient.deleteEnterprise(java.lang.String,java.lang.String,java.lang.String,java.lang.String)

Warnings:

at feign.Util.checkState(Util.java:129)

at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:127)

at org.springframework.cloud.openfeign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:207)

at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:62)

at feign.hystrix.HystrixDelegatingContract.parseAndValidateMetadata(HystrixDelegatingContract.java:47)

at feign.ReflectiveFeign$ParseHandlersByName.apply(ReflectiveFeign.java:151)

at feign.ReflectiveFeign.newInstance(ReflectiveFeign.java:49)

at feign.hystrix.HystrixFeign$Builder.target(HystrixFeign.java:70)

at org.springframework.cloud.openfeign.BladeHystrixTargeter.target(BladeHystrixTargeter.java:59)

at org.springframework.cloud.openfeign.FeignClientFactoryBean.loadBalance(FeignClientFactoryBean.java:352)

at org.springframework.cloud.openfeign.FeignClientFactoryBean.getTarget(FeignClientFactoryBean.java:388)

at org.springframework.cloud.openfeign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:361)

at org.springframework.cloud.openfeign.FeignClientsRegistrar.lambda$registerFeignClient$0(FeignClientsRegistrar.java:246)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1235)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)

... 18 common frames omitted


2条回答
  •  zhx1994
    zhx1994 (最佳回答者)
    2023-03-29 14:32

    这个feign调用的时候参数不对。

    Caused by: java.lang.IllegalStateException: Method has too many Body parameters

    org.springblade.edo.base.enterprises.enterprise.feign.EnterprisePeripheralClient.deleteEnterprise

    作者追问:2023-03-29 14:32

    请问为啥不加以下代码 就不会报错呢

    image.png

    0 讨论(1)
  • 2023-03-29 13:23

    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

    0 讨论(0)
提交回复