Spring에서 파일 업로드 REST API를 만들기 위해서는 HTTP POST와 MultipartFile을 인자로 간단하게 만들 수 있습니다. 아래와 같이 컨트롤러에 Post endpoint를 만든 후, MultipartFile을 인자로 넣어줍니다. 그리고 로직을 구현할 Service 빈에 MultipartFile 객체를 넘겨줍니다. @RestController public class UploadController { UploadFileService uploadFileService; public UploadController(UploadFileService uploadFileService) { this.uploadFileService = uploadFileService; } @PostMapping("/..
Spring
2021. 8. 30. 15:04
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- error
- JSON
- docker
- Filter
- Linux
- plugin
- elasticsearch
- Spark
- logstash
- spring
- Kibana
- gradle
- install
- mac
- Java
- scala
- Index
- Size
- apm
- spring boot
- tomcat
- Log
- SpringBoot
- AWS
- Postman
- maven
- intellij
- Container
- JPA
- Git
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함
