• Andy Wilkinson's avatar
    Honor spring.autoconfigure.exclude in test slices · 502ccb65
    Andy Wilkinson authored
    Previously, the import selector for `@ImportAutoConfiguration` did not
    consider the spring.autoconfigure.exclude property when determining
    which auto-configurations to exclude. This meant that tests using a
    slice that included a particular auto-configuration would include it
    even if the application's configuration excluded it via
    spring.autoconfigure.exclude. Confusingly, this could result in a
    sliced test using an auto-configuration that would be excluded in a
    broader `@SpringBootTest`.
    
    This commit updates the ImportAutoConfigurationImportSelector to
    consider the spring.autoconfigure.exclude property so that sliced tests
    will use a subset of the auto-configurations that a `@SpringBootTest`
    would use.
    
    Fixes gh-21736
    502ccb65
Name
Last commit
Last update
..
src Loading commit data...
build.gradle Loading commit data...