【发布时间】:2020-05-24 15:57:24
【问题描述】:
我有调用 TMDB api 的应用程序。对于 api 调用,我使用 Feign 接口:
@FeignClient(name = "TMDb-movie", url = "${TMDB_URL}", path = "/movie")
public interface TmdbMovieRMI {
@GetMapping(value = "/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
ResponseEntity<String> findById(@PathVariable Integer id,
@RequestParam("api_key") String apiKey);
}
但是当我提出请求时,我遇到了这个错误:feign.codec.DecodeException: No qualifying bean of type 'org.springframework.boot.autoconfigure.http.HttpMessageConverters' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 如何解决?
【问题讨论】:
标签: java spring-cloud-feign feign