Introduce createContext() factory method in AbstractGenericContextLoader#25600
Introduce createContext() factory method in AbstractGenericContextLoader#25600maciejmiklas wants to merge 1 commit into
Conversation
|
@maciejmiklas Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@maciejmiklas Thank you for signing the Contributor License Agreement! |
Why does |
|
because I would like to replace (use my custom implementation) of DefaultListableBeanFactory.
The whole point of this change is to be able to replace DefaultListableBeanFactory. It's possible with AnnotationConfigWebApplicationContext but not for Unit-Tests
… On 17 Aug 2020, at 14:23, Sam Brannen ***@***.***> wrote:
Now we would like to customize the Bean Factory for Unit Tests.
Why does org.springframework.test.context.support.AbstractGenericContextLoader.customizeBeanFactory(DefaultListableBeanFactory) not meet your needs?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#25600 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAZMFRFHCXAKCK5XZGYIO6DSBEOMRANCNFSM4QBSR57A>.
|
Understood. Thanks for the prompt feedback. I think it should be relatively safe to include such a change in |
|
Thank you! |
…Loader Prior to this commit it was possible to configure the DefaultListableBeanFactory used by the GenericWebApplicationContext created by AbstractWebGenericContextLoader, but it was not possible to completely replace the bean factory. This commit introduces a new createContext() factory method in AbstractWebGenericContextLoader which indirectly allows subclasses to supply a custom DefaultListableBeanFactory implementation to the GenericWebApplicationContext. See spring-projectsgh-25600 Closes spring-projectsgh-28983
We have customized
DefaultListableBeanFactoryand are using it already inAnnotationConfigWebApplicationContextfor production.Now we would like to customize the
DefaultListableBeanFactoryfor integration tests as well, but in order to archive that we need a new factory method inAbstractGenericContextLoader.