草庐IT

BeanWithRuntimeDependencies

全部标签

java - 具有运行时确定的构造函数参数的部分 Autowiring Spring 原型(prototype) bean

ConstructorResolver.autowireConstructor(...)的javadoc说Alsoappliedifexplicitconstructorargumentvaluesarespecified,matchingallremainingargumentswithbeansfromthebeanfactory.但我无法让它工作。我得到一个BeanCreationException:Couldnotresolvematchingconstructor(hint:specifyindex/type/nameargumentsforsimpleparameterst