@ConfigurationProperties1 SPRING BOOT- .properties에서 값 가져오기 1. key- value형태로 properties에 값 등록하기 chibumps.name = chibumps chibumps.age= 20 2. properties와 매핑 해줄 class 정의 하기 이때, class를 bean에 등록해주고 @ConfigurationProperties(prefix=key값)으로 annotation을 등록 해야한다. package cho.springboot; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @Component @ConfigurationProperties("chibumps") public.. 2022. 2. 2. 이전 1 다음