일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- javax
- commons-fileupload
- 2중for
- 케밥케이스
- springboot
- jpa
- for
- 태그없음
- Docker
- 외부허용
- banner
- 자바란
- Entity
- 스네이크케이스
- 카멜케이스
- 테이블정의서
- redis
- nginx
- MongoTemplate
- spring
- inmemory
- websokcet
- 파스칼케이스
- spring-rest-docs
- OS
- java
- mongodb
- pdf변환
- 반복
- linux
Archives
- Today
- Total
목록multipartfile (1)
겸쨔
[spring] apache commons-fileupload MultipartFile 변환
안녕하세요.비즈니스 로직 단에서 생성한 파일을 MultipartFile로 변환해야 하는 일이 있었어요.구글링하다가 찾은건데 apache에서 만든 commons-fileupload 라이브러리를 사용하면,쉽게 가능하다해서 사용한거 기록할겸 작성해요. 환경jdk 11spring boot 2.7.0maven의존성 commons-fileupload commons-fileupload 1.4 우선 html body에 컨텐츠만 넣고나서 바로 업로드 할거에요.Document doc = Jsoup.parse("");doc.body().append(mcArticle.getConts());String htmlContent = doc.html();byte[] contentBytes = htmlContent.getByte..
spring
2024. 10. 31. 17:52