Today Yewon Learned

[Egov] Spring 파일 업로드 - uploadPath 서비스 이용하기 본문

Spring/Egov

[Egov] Spring 파일 업로드 - uploadPath 서비스 이용하기

데브워니 2023. 2. 28. 16:29
@Resource(name="uploadPath")
    String uploadPath;

1. java controller에서 uploadPath 서비스를 이용하기 위해서는 dispatcher-servlet.xml 파일에 태그 추가

 

2. 파일 업로드 경로 지정

<!-- 팝업 업로드 자료 경로 -->
<bean id="uploadPath" class="java.lang.String">
    <constructor-arg value="D:\lgsecurity\upload"/>
</bean>
Comments