Do not fail with a circular @Import error caused by an @ComponentScan [SPR-14517] #19086
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Jean-Pierre Bergamin opened SPR-14517 and commented
This ticket is a follow up on #17692:
We're facing a "Configuration problem: A circular
@Import
has been detected" error when upgrading from Spring Boot 1.3.1 to 1.3.5.Our case is like:
A shared repository maven module contains:
A webapp using this shared repository (including it as a test-jar as well) has:
The component scan in the MyRepositoryContextConfiguration class picks up the MyRepositoryTestConfiguration again when running tests and leads to the following error:
A
@ComponentScan
should not trigger this error since it's not an explicit@Import
definition.Affects: 4.2.6
Reference URL: https://jira.spring.io/browse/SPR-13101?focusedCommentId=130875&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-130875
Issue Links:
@Bean
not detected in extended interface@Import
vs import through nestingBackported to: 4.2.8
The text was updated successfully, but these errors were encountered: