linked linked linkedin whatsapp remove
Feedback

Spring Framework Quiz Spring Framework

How can you access the application context in a Spring integration test?

The context is present in a ThreadLocal so you can just call getSpringApplicationContextInstance() anywhere in a test to get the current context.
Test classes can implement the ApplicationContextAware interface or autowire the ApplicationContext.
The context is automatically injected in every test so you can just call getSpringApplicationContextInstance() anywhere in a test to get the current context.
You can just add the parameter Context context to any method so that the context is automatically wired in.

Answer:
Test classes can implement the ApplicationContextAware interface or autowire the ApplicationContext.

Note: This Question is unanswered, help us to find answer for this one