Spring boot 파일 다운로드
어제 업로드에 이어 다운로드입니다. dependency는 https://cusonar.tistory.com/45 글을 참조해주세요. ID는 파일명입니다. 업로드에서 UUID 형식으로 파일을 저장했으므로 UUID를 ID에 넣어주시면 됩니다. FileController.java @RestController @RequestMapping("/files") @Slf4j public class FileController { @Value("${temp.path}") private String tempPath; @GetMapping("/{id}") public Resource download(@PathVariable String id) throws IOException { File file = new File(temp..
Java/Spring Boot
2019. 5. 17. 16:53
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Spring Boot
- TypeScript
- mockmvc
- 알고리즘
- test static import
- 티지유모차
- 거품정렬
- 어드보케이트
- router-outlet
- CURL
- styleUrls
- Ajax
- 빠른 정렬
- spring security
- rest login
- mybatis
- routerLink
- RouteConfig
- controller test
- 타보유모차
- 유아동겸용
- 머지소트
- angular
- routeParams
- templateUrl
- angular2
- insert sort
- angular 2
- routing
- 기내반입유모차
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
글 보관함