Programming/에러

Error creating bean with name 'configurationPropertiesBeans' defined in class path resource

오늘 하루s 2024. 3. 26. 16:40
728x90

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Post-processing of merged bean definition failed

 

 

MSA 관련 셋팅 중 발생한 빈등록 오류.

 

 

원인

spring boot에서 spring cloud 사용시 spring cloud version 과 spirng boot version 이 호환되지 않아서 발생하는 문제.

 

https://spring.io/projects/spring-cloud

 

Spring Cloud

Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, short lived microservices and

spring.io

(해당하는 버전 확인)

 

 

해결

spirng boot version에 맞는 realease버전을 셋팅해야 한다.

 

https://spring.io/blog/2023/12/06/spring-cloud-2023-0-0-aka-leyton-is-now-available

 

Spring Cloud 2023.0.0 (aka Leyton) Is Now Available

On behalf of the community, I am pleased to announce that the General Availability (RELEASE) of the Spring Cloud 2023.0.0 Release Train is available today. The release can be found in Maven Central. You can check out the 2023.0 release notes for more infor

spring.io

 

현재  spirng boot 3.2.4 버전을 사용 중이어서 다음 dependecy로 변경해 주었다.

 

 

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>2023.0.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-config</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
    ...
</dependencies>
728x90