IT'S DO
728x90

#Error 문구

Description:

Parameter 1 of constructor in com.hanmac.wbsservice.controller.api.WbsApiController required a bean of type 'com.demo.wbsservice.client.CategoryServiceClient' that could not be found.


Action:

Consider defining a bean of type 'com.demo.wbsservice.client.CategoryServiceClient' in your configuration.

 

#해결 방법

 

bean 추가 해주기

@EnableDiscoveryClient
@EnableFeignClients
public class WbsServiceApplication {

타입의 빈(bean)을 찾을 수 없다는 것을 나타냅니다. 따라서 해당 빈을 구성 파일 또는 속성 파일에서 정의해야 합니다.

CategoryServiceClient는 Feign Client이므로 스프링이 해당 클라이언트를 인식하고 빈으로 등록하려면 @EnableFeignClients 어노테이션이 있는 구성 클래스를 작성해야 합니다.

profile

IT'S DO

@멋진놈

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!