‘ABCService’ is not reachable by @ComponentsScan or @SpringBootApplication. Either move it to a package configured in @ComponentsScan or update your @ComponentsScan configuration.
This the error message I get in 9 critical bugs in Sonarqube analysis, one for each Service and Controller.
Though @Autowire and dependency injection is working fine but still Sonar seems to be complaining.
The rule in question causing the issue is:
Spring beans belonging to packages that are not included in a
@ComponentScan configuration will not be accessible in the Spring
Application Context. Therefore, it’s likely to be a configuration
mistake that will be detected by this rule. Note: the @ComponentScan
is implicit in the @SpringBootApplication annotation, case in which
Spring Boot will auto scan for components in the package containing
the Spring Boot main class and its sub-packages.
Since @SpringBootApplication is has component scan which scans main class package and all it’s sub packages as well this issue shouldn’t come.