Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sieum.batch.feign.MusicFeignClient': Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer?
Caused by: java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer?
다른 컴포넌트의 설정 그대로 했는데 의존성 문제가 생겨서 실행도 안됨
🧸 해결
- Client 빈 생성할 때 null로 파라미터를 줌
@Configuration
@EnableFeignClients(basePackageClasses = BaseFeignClientPackage.class)
public class FeignCommonConfig {
@Bean
public Client FeignCommonConfig() {
return new Client.Default(null, null);
}
}
반응형
'Framework > Spring Boot' 카테고리의 다른 글
[Error] 'org.springframework.batch.core.configuration.annotation.JobBuilderFactory' that could not be found. (0) | 2024.05.06 |
---|---|
prometheus와 SpringBoot 연동 (0) | 2024.05.02 |
[Error] Request failed with status code 403 (0) | 2024.04.04 |
[Error] Uncaught exception: feign.RetryableException (0) | 2024.03.28 |
[Error] Error creating bean with name 'stackResourceRegistryFactoryBean' (0) | 2023.11.09 |