-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
I have a test that I can not get to working after upgrading from spring boot 1.3.x to 1.5.1
I replaced this:
@SpringApplicationConfiguration(classes = SpringBootTestConfig.class)
with
@SpringBootTest(webEnvironment = WebEnvironment.NONE, classes = SpringBootTestConfig.class)
But now I am getting this error
Caused by: java.lang.IllegalStateException: The following classes could not be excluded because they are not auto-configuration classes:
- <mypackage>.AbstractServiceConfig
at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.handleInvalidExcludes(AutoConfigurationImportSelector.java:192)
at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.checkExcludedClasses(AutoConfigurationImportSelector.java:177)
at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.selectImports(AutoConfigurationImportSelector.java:99)
at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:537)
... 38 more
My SpringBootTestConfig
however looks like this:
@ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = {
AbstractServiceConfig.class }))
@SpringBootApplication(exclude = { AbstractServiceConfig.class })
public class SpringBootTestConfig {
...
}
Could you give me any hints why the excludes are not working properly?
Metadata
Metadata
Assignees
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is valid