在Spring的Controller中获取WEB服务器上的物理路径

代码:String CARD_SALE_FILE_DIR =  this.getServletContext().getRealPath("/WEB-INF/resources/card_sale_stat/");

另外,Controller必须是AbstractController的子类

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.