Notice
Recent Posts
Recent Comments
Link
«   2025/09   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Tags
more
Archives
Today
Total
관리 메뉴

devNyong

스프링 서버 경로 구하기 본문

springboot

스프링 서버 경로 구하기

devNyong 2022. 6. 15. 14:08
//getRealPath() : 실제 톰캣이 돌아가고 있는 컴퓨터에서 그 곳의 절대 주소값
String rootPath = request.getSession().getServletContext().getRealPath("/"); 

//저장경로 
1 String uploadPath = rootPath + "upload" ;
2 String uploadPath = request.getServletContext().getRealPath("/upload");

'springboot' 카테고리의 다른 글

[Oracle] mybatis 날짜 조회  (0) 2022.10.07
Rest Api Exception 처리 ExceptionAdvice  (0) 2022.05.31
[ SpringBoot ] api test , jpa test 코드  (0) 2022.05.18
Comments