refreshscope (1) 썸네일형 리스트형 Spring Cloud Context의 @RefreshScope를 사용하여 properties 설정 갱신하기 기본적인 @ConfigurationProperties , @PropertySource 사용Spring Boot 기반 프로젝트에서 @ConfigurationProperties 로 지정된 bean은 처음 application이 startup 할 때 bean이 생성되고 여러 properties 파일에서 읽어와 Environment에 저장된 값을 가져와 해당 bean에 바인딩해 준다.다음과 같이 @ConfigurationProperties 를 선언하고@ConfigurationProperties(prefix = "someProperties")@Datapublic class SomeProperties { private String someKey1; private long someKey2; //.. .. 이전 1 다음