diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bcefbddd..d564dddcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * 【crypto 】 SecureUtil去除final修饰符(issue#1474@Github) * 【core 】 IoUtil增加lineIter方法 * 【core 】 新增函数式懒加载加载器(pr#275@Gitee) +* 【http 】 UserAgentUtil增加miniProgram判断(issue#1475@Github) ### Bug修复 * 【core 】 修复IoUtil.readBytes的FileInputStream中isClose参数失效问题(issue#I3B7UD@Gitee) diff --git a/hutool-http/src/main/java/cn/hutool/http/useragent/Browser.java b/hutool-http/src/main/java/cn/hutool/http/useragent/Browser.java index 45c35a264..c6ab83069 100644 --- a/hutool-http/src/main/java/cn/hutool/http/useragent/Browser.java +++ b/hutool-http/src/main/java/cn/hutool/http/useragent/Browser.java @@ -8,7 +8,7 @@ import java.util.regex.Pattern; /** * 浏览器对象 - * + * * @author looly * @since 4.2.1 */ @@ -50,6 +50,8 @@ public class Browser extends UserAgentInfo { new Browser("wxwork", "wxwork", "wxwork\\/([\\d\\w\\.\\-]+)"), // 微信 new Browser("MicroMessenger", "MicroMessenger", "MicroMessenger\\/([\\d\\w\\.\\-]+)"), + // 微信小程序 + new Browser("miniProgram", "miniProgram", "miniProgram\\/([\\d\\w\\.\\-]+)"), // 钉钉 new Browser("DingTalk", "DingTalk", "AliApp\\(DingTalk\\/([\\d\\w\\.\\-]+)\\)") ); @@ -59,7 +61,7 @@ public class Browser extends UserAgentInfo { /** * 构造 - * + * * @param name 浏览器名称 * @param regex 关键字或表达式 * @param versionRegex 匹配版本的正则 @@ -76,7 +78,7 @@ public class Browser extends UserAgentInfo { /** * 获取浏览器版本 - * + * * @param userAgentString User-Agent字符串 * @return 版本 */ @@ -86,7 +88,7 @@ public class Browser extends UserAgentInfo { /** * 是否移动浏览器 - * + * * @return 是否移动浏览器 */ public boolean isMobile() {