uploadFirmware 上传固件接口

This commit is contained in:
Guoqs
2024-05-21 15:32:40 +08:00
parent 724d3ca4b7
commit ca543b57de
2 changed files with 46 additions and 1 deletions

View File

@@ -227,6 +227,23 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
return StringUtils.startsWithAny(link, Constants.HTTP, Constants.HTTPS);
}
/**
* 去除http(s)://开头
* @param link
* @return
*/
public static String removeHttp(String link) {
String result;
if (StringUtils.startsWith(link, Constants.HTTP)) {
result = link.replace(Constants.HTTP, "");
} else if (StringUtils.startsWith(link, Constants.HTTPS)) {
result = link.replace(Constants.HTTPS, "");
} else {
result = link;
}
return result;
}
/**
* 字符串转set
*