Hi, thank you very much for your detailed reply first.
I has tried the approach you proposed no long ago. as:
and added to org.springframework.boot.autoconfigure.AutoConfiguration.imports. But it is no use, these beans annotated by @Component can't create by spring still.
Of curse sure, @Bean create is correct, but my project will have so many beans in the future, i can't @Bean them one by one...
Now I have found the solution to this problem.
It is missing a file at ./build/classes/java/main/META-INF/spring.components.
but all modules of CAS7.0.0 exist this file, so these beans created by myself won't be scanned.
Just inject the following dependencies at build.gradle then compile or build project, it will automatically generate 'spring.components' file: