With this commit it is possible to partially autowire constructors. It is useful, for example, for lookup methods, creating prototype beans. Sometimes prototype beans depend on singletons, and before to create such prototypes it was required to write custom factories. This change allows to use lookup methods.

Comment From: goatfryed

Any news on this topic?

I'm working on refactoring a legacy application. Especially on partially migrated projects, this would be really helpful. I see myself writing a lot of boilerplate factory methods to merge managed dependencies with unmanaged dependencies, since i can't simply use ObjectProvider and provide only arguments that are not autowire-able.

But I found my self occasionally bumping into the same issue in standard spring objects. The alternative is to use setters for unmanaged dependencies, but this also adds boilerplate and the code looks gets less clean with not-final mandatory dependencies..

Comment From: gzoom13

Hi @goatfryed. Since no one was reviewing this, I ended up copy-pasting original bean factory and modifying it in separate library: https://github.com/gzoom13/partial-autowire-bean-factory/. I have not published it, but if it will be useful for you, I could do it. It also requires some decomposition. What Spring version do you have?

Comment From: snicoll

Sorry for the late review. I can see you've moved this somewhere else and I don't think we want to support the additional complexity so I am going to close this now.