Spring Boot Application Is Not Scanning My Components

Asked By 0 points N/A Posted on -
qa-featured

I was working over my project and while I was testing its working I found out that the spring boot application doesn’t scan the components. How can I solve this issue? Please suggest.

SHARE
Answered By 10 points N/A #318604

Spring Boot Application Is Not Scanning My Components

qa-featured

If you face this issue then you must know the fact that the scanning of the components is a process of by default that happens when the package has the sub package of the required functionalities within itself. If your components are stored in a different package then this issue will arise you have to get a function that will override the same function and classes as per the required needs.

For an example you can take,

@SpringBootApplication(scanBasePackages = {“com.java2novice”, “com.simplebro”}).

Related Questions