Https://stackoverflow.com/questions/40384056/consider-defining-a-bean-of-type-package-in-your-configuration-spring-boot
Your Applicant class is not scanned it seems. By default all packages starting with the-the class where you have put'll be @SpringBootApplication
scanned.
Suppose your main
class "Webserviceapplication" is in "" and then all components this com.service.something
fall under "is com.service.something
scanned, an D " com.service.applicant
" won't be scanned.
You can either restructure your packages such this "webserviceapplication" falls under a root package and all other Compon Ents becomes part of the. Root package. Or you can include @SpringBootApplication(scanBasePackages={"com.service.something","com.service.application"})
etc such this "all" components is scanned and initialized in the spring container.
Update based on Comment
If you have multiple modules-being managed by maven/gradle, all spring needs was the package to scan. You tell the spring to scan "Com.module1" and the Another module which has the IT root package name as "Com.module2", those components wont is scanned. You can even the spring to scan "com" which would then scan all the components in " com.module1.
" and " com.module2.
"
I am not sure if it is because I has my project broke down modules and this is what I solved my issue of not being able to Find my repositories. @SpringBootApplication@ComponentScan({"com.delivery.request"})@EntityScan("com.delivery.domain")@EnableJpaRepositories("com.delivery.repository")
|
Consider defining a bean of type ' package ' in your configuration [Spring-boot]