Hello.Today we introduced a third-party jar into my project.Unfortunately, our project was not worked.

When we look at code ,@Component and spring.components cannot both exist simultaneously, why is it designed this?

org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider#addCandidateComponentsFromIndex

I attached a sample project demo3.zip https://github.com/Cubeatz/springboot-components-test

spring-boot-version:2.7.13

Thanks!

Comment From: wilkinsona

The indexer is a Spring Framework feature. The behavior that you have described is a known limitation and is one of the reasons for its deprecation.