콘텐츠기획자의 IT입문서

맥북에서 파일경로 설정 (C드라이브, D드라이브) 본문

Spring

맥북에서 파일경로 설정 (C드라이브, D드라이브)

lazy_cat 2022. 3. 8. 15:02

현재 작업중인 프로젝트에서 이미지 파일 업로드 기능을 추가했는데

 

팀원들이 다 윈도우 유저들이라

properties에서 이렇게 경로 설정을 해주었다.

file.dir=C:/upload/
file.imageDir=C:/imageUpload
file.regFiledir=C:/upload/reg_file/

 

그런데 맥북을 쓰는 나에게는 C드라이브가 없기 때문에 (D드라이브도 동일)

이미지 업로드를 하려하면 이런 짜증나는 에러가 뜸...ㅜ

더보기

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileServiceImpl': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'file.regFiledir' in value "${file.regFiledir}"

 

그래서 이리저리 알아본 결과

root를 /Users/로 설정해주면 된다!

file.dir=/Users/macbook-id/upload/
file.imageDir=/Users/macbook-id/imageUpload
file.regFiledir=/Users/macbook-id/upload/reg_file/

 

 

업로드 성공 자축~!

Comments