Closed bandrefilipe closed 1 year ago
Fixed!
Turns out I mistakenly declared spring cloud dependencies' bill of materials inside subprojects
configuration section in my build.gradle
, and not inside the allprojects
section, as I should.
This fixed:
allprojects {
// ...
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:2022.0.0")
}
}
// ...
}
subprojects {
// ...
dependencyManagement {
imports {
mavenBom(SpringBootPlugin.BOM_COORDINATES)
}
}
// ...
}
Hi! Spring doesn't seem to register my feign client on its bean factory, thus not being able to inject it into other beans, under this set of project settings:
spring-starter
only + a module whereopenfeign
dependency is17
3.0.2
1.7.22
2022.0.0
See this example: https://github.com/bandrefilipe/teste-feign
@SpringBootApplication
annotated main class, within packagecom.example
feign
module, my@FeignClient
and@EnableFeignClients
annotated classes are within packagecom.example.feign
Whenever I run this sample, I get
Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'com.example.feign.Client' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
I have a similar configured project running Spring Boot
2.7.4
, Spring Cloud2021.0.4
and JDK17
where this exact package/module structure works with FeignClient.Can someone tell my what I'm doing wrong?