|
|
|
@ -16,6 +16,7 @@ import java.io.*;
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
|
|
import java.lang.reflect.Method;
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -124,6 +125,8 @@ public class FileUtil {
|
|
|
|
|
public static String getRootWebUrlStr(HttpServletRequest request, String path) throws Exception {
|
|
|
|
|
String root = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
|
|
|
|
|
//获取配置文件中需要保存的位置
|
|
|
|
|
String fileName = path.substring(path.lastIndexOf("\\") + 1, path.length());
|
|
|
|
|
path = path.substring(0, path.lastIndexOf("\\") + 1) + URLEncoder.encode(fileName, "utf-8").replaceAll("\\+","%20");
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(path)) {
|
|
|
|
|
while (path.indexOf("\\") != -1) {
|
|
|
|
@ -134,7 +137,6 @@ public class FileUtil {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (WEBURL_REMOTE_BEUSE && StringUtils.isNotBlank(WEBURL_REMOTE_PATH)) {
|
|
|
|
|
root = xmlConfig_webUrl.getResourcesvalue() + path;
|
|
|
|
|
} else {
|
|
|
|
|