- 파일 업로드
- spring-boot MultipartFilter 적용CommonsMultipartResolver로 multipartResolver 구현 후 MultipartAutoConfiguration 제거해야 MultipartFilter 적용 됨MultipartAutoConfiguration 제거 후 CommonsMultipartResolver 상속 받아 Custom 후 MultipartFilter 설정 하거나
MultipartFilter 도 상속 받아 Custom 해서 사용 해도 됨
@Autowired
private MultipartProperties multipartProperties;
@Bean
public MultipartResolver multipartResolver() {
LOG.debug("initializing MultipartResolver");
MultipartConfigElement config = multipartProperties.createMultipartConfig();
CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
multipartResolver.setResolveLazily(true);
multipartResolver.setMaxUploadSize(config.getMaxRequestSize());
multipartResolver.setMaxUploadSizePerFile(config.getMaxFileSize());
return multipartResolver;
}
https://stackoverflow.com/questions/38999173/cannot-configure-commonsmultipartresolver-with-spring-boot-1-2-8
- spring upload example
https://www.baeldung.com/spring-file-upload
- MultipartFile, MultipartHttpServletRequest, custom Dto
https://caileb.tistory.com/152
- spring-boot 다중 파일 업로드https://data-make.tistory.com/m/669
https://gofnrk.tistory.com/36
- 파일 다운로드
- spring-boot download
https://gofnrk.tistory.com/80
- spring download 정리
https://move02.github.io/articles/2020-07/Spring-File-Download
'spring-boot' 카테고리의 다른 글
Inject a Map from YAML File with Spring AND @Bean 어노테이션 붙이는 메소드에서 처리법 (0) | 2020.08.04 |
---|---|
JNDI설정 (0) | 2020.07.22 |
spring boot war 배포시 ClassNotFoundException: javax.servlet.GenericFilter (0) | 2020.07.12 |
spring boot jsp, tiles설정 (0) | 2020.07.03 |
스프링부트 톰캣 war 배포 (0) | 2020.04.18 |