spring yml 사용법
-
yaml 설정파일 값 사용하기etc 2021. 4. 1. 23:14
// yaml weather: busan: 17 seoul: 13 yangsan: 14 island: jeju: 20 dokdo: 17 1. @Value - Spel 을 활용 @Service public class propertiesService { @Value(${weather.busan}) private int busan; @Value(${weather.seoul}) private int seoul; @Value(${weather.yangsan}) private int yangsan; @Value(${weather.island.jeju}) private int jeju; @Value(${weather.island.dokdo}) private int dokdo; } 2. @ConfigurationPro..