[Spring] ConfigurationProperties + ConfigurationPropertiesScan
·
JVM/Spring
사전 조건 application.yaml 설정 dependency 설정 spring-boot-configuration-processor annotationProcessor 를 추가해줘야한다. Java 순서 1. ConfigurationProperties 등록 on ConfigClass @Getter @RequiredArgsConstructor @ConfigurationProperties(prefix = "server") public class ServerConfig { private final String port; private final String ip; private final String hostname; } 2. ConfigurationPropertiesScan 등록 on main @Sprin..