Allow @Import to be used directly on test classes

Remove the need for a nested @Configuration class when writing a test
that need to @Import configuration.

Primarily added to allow @ImportAutoConfiguration to be used directly
on test classes.

Fixes gh-5473
This commit is contained in:
Phillip Webb
2016-03-22 13:02:39 -07:00
parent ab7b48de84
commit ae1d352d34
5 changed files with 542 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
# Spring Test ContextCustomizerFactories
org.springframework.test.context.ContextCustomizerFactory=\
org.springframework.boot.test.context.ImportsContextCustomizerFactory,\
org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizerFactory,\
org.springframework.boot.test.context.web.WebIntegrationTestContextCustomizerFactory,\
org.springframework.boot.test.mock.mockito.MockitoContextCustomizerFactory