“autowire constructor” (with constructor arguments by type) behavior.Also applied if explicit constructor argument values are specified,matching all remaining arguments with beans from the bean factory.<p>This corresponds to constructor injection: In this mode, a Springbean factory is able to host components that expect constructor-baseddependency resolution.
“主动拆卸构造函数”(结构函数参数按类型)行为。如果指定了显式构造函数参数值,也能够利用,将所有残余的参数与来自 bean 工厂的 bean 匹配。这对应于构造函数注入: 在这种模式下,一个 Springbean factory 可能托管冀望基于结构器的组件依赖性解析。org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#autowireConstructororg.springframework.beans.factory.support.ConstructorResolver#autowireConstructor
之前用 BeanPostProcessor 的形式解决
当初能够替换成这种
本文由博客群发一文多发等经营工具平台 OpenWrite 公布