0

想在 Spring MVC Web 应用程序中将文件从一个位置复制到另一个位置,如何在 Web 应用程序中配置路径和读取路径。

谢谢,

4

2 回答 2

0

There is a tag in your web.xml (or must be) that you can specify where your spring configurations are. The tag is < context-param >

Here I give you an example:

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
        /WEB-INF/applicationContext-hibernate.xml
        /WEB-INF/spring/applicationContext-security.xml
    </param-value>
</context-param>


The former configuration is in the WEB-INF folder,
and the latter is in the WEB-INF/spring (as you may have noticed).

于 2012-07-09T10:37:15.823 回答
0

尝试使用Apache Commons IO FileUtils

于 2012-07-09T13:51:29.593 回答