목록Properties (1)
특별한 일상
안녕하세요. 소다맛사탕 입니다. Spring Framework 프로젝트에서 properties 파일을 읽어와 사용하는 경우가 있습니다. @PropertySource @Value Spring xml 설정파일에서 bean을 선언한 것과 동일하게 어노테이션을 선언하여 사용 가능. common.test.test01=테스트01 common.test.test02=테스트02 testInfo.properties(.properties) public class CommonUtil { // @Value("#{testInfo['common.test.test01']}") @Value("${common.test.test01}") private static String testKey; public static String prin..
IT•개발 끄적/Spring
2023. 10. 30. 19:16