***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'memberService', defined in class path resource [(경로)/DependencyConfig.class], could not be registered. A bean with that name has already been defined in file [(경로)/member/MemberService.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
스프링 부트 실행 시 위와 같은 내용의 에러가 발생했다.
이는 스프링 부트 버전 2.1 이상부터 오버라이딩 기능을 멈추도록 변경되어 발생하는 에러이다.
Action
에 나오는 메시지대로 application.properties
파일에 아래의 설정 코드를 입력하면 오버라이딩 가능하도록 변경할 수 있다.
spring.main.allow-bean-definition-overriding=true