[Spring || SpringBoot] Spring에서 @Value로 Properties 값 가져오기
Spring boot에서는 외부 설정 파일을 통해 Properties 설정 값을 관리할 수 있다. application.properties 또는 application.yml 파일에 저장된 값을 Java 코드에서 불러오는 방법 중 하나는 @Value 어노테이션을 사용하는 것이다. @Value 어노테이션 사용하기# application.propertiesapp.name=MySpringApplicationapp.version=1.0.0 위와 같이 설정 값을 저장한다고 가정한다. import org.springframework.beans.factory.annotation.Value;import org.springframework.stereotype.Component;@Componentpublic class A..