移除 yauaa 获取UA信息,采用hutoolUA工具类-UserAgentUtil 获取浏览器信息

This commit is contained in:
Zheng Jie 2023-07-05 18:11:47 +08:00
parent 4579046143
commit 78b58091e4

View File

@ -171,7 +171,8 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
public static String getBrowser(HttpServletRequest request) {
UserAgent ua = UserAgentUtil.parse(request.getHeader("User-Agent"));
return ua.getBrowser().toString() + " " + ua.getVersion();
String browser = ua.getBrowser().toString() + " " + ua.getVersion();
return browser.replace(".0.0.0","");
}
/**