인프런 커뮤니티 질문&답변

이원준님의 프로필 이미지

작성한 질문수

스프링 부트 개념과 활용

자동 설정 만들기 1부: Starter와 AutoConfigure

build시 다음과 같은 에러가 납니다.

19.03.10 20:18 작성

·

982

1

APPLICATION FAILED TO START

Description:

The bean 'holoman', defined in class path resource [me/izac/HolomanConfiguration.class], could not be registered. A bean with that name has already been defined in me.izac.Application and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

Process finished with exit code 1

답변 1

0

백기선님의 프로필 이미지
백기선
지식공유자

2019. 03. 11. 00:31

스프링 부트 버전이 2.1로 올라가면서 오버라이딩 하는 기능을 멈추도록 바꿨습니다. 그래서 저기 메시지대로 spring.main.allow-bean-definition-overriding=true 이 설정을 application.properties 에 추가하시면 오버라이딩이 되도록 할 수 있고 그렇게 하면 영상과 동일한 현상을 확인할 수 있습니다.