配置文件常量整理

This commit is contained in:
dxfeng 2024-01-22 17:49:20 +08:00
parent cb86a9e33b
commit a20f7ed40c
1 changed files with 6 additions and 2 deletions

View File

@ -1,9 +1,10 @@
package com.engine.recruit.constant;
import com.engine.recruit.exception.CustomizeRunTimeException;
import org.apache.commons.lang.StringUtils;
import weaver.general.BaseBean;
import java.net.URL;
import java.net.URI;
import java.nio.charset.StandardCharsets;
/**
@ -90,8 +91,11 @@ public class RecruitConstant {
* @return
*/
public static String getCompleteUrl(String url) {
if (StringUtils.isBlank(url)) {
return "";
}
try {
URL u = new URL(url);
URI u = new URI(url);
// 如果URL对象的getHost()方法获取到了域名则直接返回原始URL
if (u.getHost() != null) {
return url;