[자바] 스프링의 환경 설정 : 프로파일(Profile) 사용하기
2022. 7. 20. 17:51
스프링
현업에서는 환경을 다양하게 해서 특정 환경에서만 특정 Bean이 동작하도록 설정해주는 환경 설정이 있다. @Component public class PaymentType implements PaymentService { } @Component public class PaymentAmount implements PaymentService { } 위와 같이 동일한 인터페이스로 만들어진 두 클래스가 있고 Bean으로 지정되어 있다. 이 상태로 PaymentService 인터페이스를 실행시키려 하면 아래와 같은 메시지가 나타날 것이다. Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of..