
大家好,又见面了,我是全栈君。
public static String DEPLOY_PATH = null;
static
{
String CurrentClassFilePath = Constant.class.getResource("").getPath();
int lastpath = CurrentClassFilePath.lastIndexOf("WEB-INF/");
DEPLOY_PATH = CurrentClassFilePath.substring(0, lastpath);
}參考:http://blog.sina.com.cn/s/blog_6f3da9650101d70r.html
http://tech.ddvip.com/2011-11/1322014194170006.html
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/116001.html原文链接:https://javaforall.cn