Spring File Upload Download
http://addio3305.tistory.com/83
https://www.journaldev.com/2573/spring-mvc-file-upload-example-single-multiple-files
Maven Dependency 추가
pom.xml<!-- 파일 업로드 관련 설정 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
CommonMultipartResolver
server-context.xml
<beans:bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<beans:property name="maxUploadSize" value="10000000"/><!-- 단위 byte, 1000만byte=10M 값을 지정안하면 무제한. -->
<beans:property name="maxInMemorySize" value="10000000"/>
</beans:bean>
https://www.journaldev.com/2573/spring-mvc-file-upload-example-single-multiple-files
Maven Dependency 추가
pom.xml<!-- 파일 업로드 관련 설정 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
commons-io 의존
CommonMultipartResolver
server-context.xml
<beans:bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<beans:property name="maxUploadSize" value="10000000"/><!-- 단위 byte, 1000만byte=10M 값을 지정안하면 무제한. -->
<beans:property name="maxInMemorySize" value="10000000"/>
</beans:bean>
댓글
댓글 쓰기