我的春季批处理程序写得一切正常,直到我尝试重构bean的名称和各自的类名,然后我开始得到以下异常
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
是什么以及为什么会发生这种异常。
答案 0 :(得分:0)
在spring配置文件中检查每个spring bean的id属性后发现多个spring bean具有相同的id,所以在将它们更改为唯一id后问题得到解决