!280 优化CAD转换

* 调整输出日志信息
* 统一错误提示规范
* 修复 转义后 流接入方法错误的问题
* 修复 转义后 流接入方法错误的问题
* CAD报错调整
* 优化CAD转换 调整CAD中断进程
This commit is contained in:
高雄
2024-03-25 02:26:50 +00:00
committed by 陈精华
parent ebd35803c6
commit 6504ae2f45
3 changed files with 90 additions and 78 deletions

View File

@ -83,7 +83,7 @@ public class WebUtils {
}
if (!UrlEncoderUtils.hasUrlEncoded(fullFileName)) { //判断文件名是否转义
try {
urlStr = URLEncoder.encode(urlStr, "UTF-8").replaceAll("\\+", "%20").replaceAll("%3A", ":").replaceAll("%2F", "/").replaceAll("%3F", "?").replaceAll("%26", "&");
urlStr = URLEncoder.encode(urlStr, "UTF-8").replaceAll("\\+", "%20").replaceAll("%3A", ":").replaceAll("%2F", "/").replaceAll("%3F", "?").replaceAll("%26", "&").replaceAll("%3D", "=");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
@ -290,14 +290,14 @@ public class WebUtils {
try {
return new String(Base64Utils.decodeFromString(source.replaceAll(" ", "+").replaceAll("\n", "")), charsets);
} catch (Exception e) {
if (e.getMessage().toLowerCase().contains(BASE64_MSG)) {
LOGGER.error("url解码异常接入方法错误未使用BASE64");
}else {
LOGGER.error("url解码异常其他错误", e);
}
if (e.getMessage().toLowerCase().contains(BASE64_MSG)) {
LOGGER.error("url解码异常接入方法错误未使用BASE64");
}else {
LOGGER.error("url解码异常其他错误", e);
}
return null;
}
}
}
/**
* 获取 url 的 host