I have annotated spring boot application with Feign Client
@SpringBootApplication
@EnableFeignClients({"com.ms.Foo1.api", "com.ms.Foo2.api",
"com.ms.Foo3.api", "com.ms.Foo4.api", "com.ms.Foo5.api", "com.ms.Foo6.api",
"com.ms.Foo7.api", "com.ms.Foo8.api", "com.ms.Foo9.api", "com.ms.Foo10.api"})
public class AnalyticsApplication extends SpringBootServletInitializer {
}
everything working fine, AS I just modify the bases packages. its start scanning package outside the api.
@SpringBootApplication
@EnableFeignClients({"com.ms.*.api"})
public class AnalyticsApplication extends SpringBootServletInitializer {
}
I am expecting that @EnableFeignClients({"com.ms.*.api"}) will scan only clients inside the api but it start scanning outside the api package as well.
what I need to change ? or can we apply regex here instead of mention every package ?
You can use a regex filter on @ComponentScan like this:
But @EnableFeignClients haven't this feature. The only thing you can do is: