java 动态获取web应用的部署路径
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);
}
浙公网安备 33010602011771号