File Upload

    [스프링 부트] 파일 업로드 시 static 정적 경로 설정

    파일 업로드를 할 때 저장하고 싶은 위치는 src\main\static\resources\upload 인데 자꾸 src\main\webapp\static\resources\upload 에 저장되는 문제가 있었다. 해결은 아직 하지 못했다.. http://localhost:8080/resources/upload/test.png 라고 주소창에 검색하면 static\resources\upload에 있는 파일이 잘 뜨는데 업로드할 때 주소 설정이 잘못된 것인지 파일 업로드만 하면 webapp으로 간다 뭔가 설정이 잘못된 것 같은데 아직 해결 방안을 찾지 못함 @PostMapping("/regist") public String doRegist(@ModelAttribute User user, @RequestPart..

출처: https://gmnam.tistory.com/157 [Voyager:티스토리]