-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce createContext() factory method in AbstractGenericContextLoader #25600
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
DefaultListableBeanFactory
and are using it already inAnnotationConfigWebApplicationContext
for production.Now we would like to customize the
DefaultListableBeanFactory
for integration tests as well, but in order to archive that we need a new factory method inAbstractGenericContextLoader
.