gpt4 book ai didi

java - 无法转换类型“$Proxy55”的值

转载 作者:行者123 更新时间:2023-12-02 13:34:10 25 4
gpt4 key购买 nike

我编写的 Spring Batch 程序一切正常,直到我尝试重构 beans 的名称和相应的类名称,然后我才开始遇到异常

Error creating bean with name
'org.springframework.batch.core.configuration.xml.SimpleFlowFactoryBean#3':
Cannot create inner bean '(inner bean)#6aed4066' of type
[org.springframework.batch.core.job.flow.support.StateTransition] while
setting bean property 'stateTransitions' with key [24]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)#6aed4066': Cannot create inner bean '(inner
bean)#7e1f1f61' of type
[org.springframework.batch.core.job.flow.support.state.StepState] while
setting constructor argument; nested exception is
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name '(inner bean)#7e1f1f61': Unsatisfied dependency
expressed through constructor argument with index 0 of type
[org.springframework.batch.core.Step]: Could not convert constructor
argument value of type [$Proxy55] to...

因此,我试图了解 $Proxy 55 是什么以及为什么会发生此异常。

最佳答案

检查 spring 配置文件中每个 spring bean 的 id 属性后发现多个 spring bean 具有相同的 id,因此将它们更改为唯一 id 后问题得到解决

关于java - 无法转换类型“$Proxy55”的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43096619/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com