@ConfigurationProperties1 spring application.yml파일 설정값 적용 spring에서 yml파일에 설정된 값을 불러와서 주입할때 사용할 수 있는 방법 두가지를 간단하게 비교하겠습니다. - application.yml : 아래와 같이 임의의 값을 입력합니다. custom: value: x: test y: test2 value_v2: z: test3 - Service @Slf4j @Service @ConfigurationProperties(prefix = "custom.value") @Getter @Setter public class MyServiceImpl implements MyService{ private String x; private String y; @Value("${custom.value_v2.z}") private String z; @Override public.. 2023. 7. 21. 이전 1 다음