Is it possible to import objects in the context of spring only if a certain condition is met?
<import resource="classpath:context/caching-context.xml" />
I am currently doing this by importing a completely different context in my test files
@ContextConfiguration(locations = { "classpath*:ApplicationContextTesting.xml" })
but perhaps there is a more elegant solution not to support two separate application contexts for production and testing.
source share