Error Injecting FeignClient from another Project
You need to tell the Feign scanner where to locate the interfaces. You can use @EnableFeignClients(basePackages = {“my.external.feign.client.package”, “my.local.package”}).
You need to tell the Feign scanner where to locate the interfaces. You can use @EnableFeignClients(basePackages = {“my.external.feign.client.package”, “my.local.package”}).
Just found the solution. Instead of defining base packages to scan from separate library, I’ve just created configuration class inside this library with whole bunch of annotation and imported it to my main MyApplication.class: package runnableProject.application; import com.myProject.customLibrary.configuration.SharedConfigurationReference.class @SpringBootApplication @Import(SharedConfigurationReference.class) public class MyApplication { public static void main(String[] args) { SpringApplication.run(MyApplication.class, args); } } package … Read more
A Bit on ApplicationContext Hierarchies Spring’s ApplicationContext provides the capability of loading multiple (hierarchical) contexts, allowing each to be focused on one particular layer, such as the web layer of an application or middle-tier services. One of the canonical examples of using hierarchical ApplicationContext is when we have multiple DispatcherServlets in a web application and … Read more
The following approach is correct: <context:component-scan base-package=”x.y.z.service, x.y.z.controller” /> Note that the error complains about x.y.z.dao.daoservice.LoginDAO, which is not in the packages mentioned above, perhaps you forgot to add it: <context:component-scan base-package=”x.y.z.service, x.y.z.controller, x.y.z.dao” />