import org.springframework.beans.factory.annotation.Value; public class ItemImgService { @Value("${itemImgLocation}") private String itemImgLocation; }
application.properties에 "itemImgLocation=image/"로 경로 지정
import lombok.Value 사용하였다.