diff --git a/README.md b/README.md index 55cbfbb78b..4f0d63e754 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

- + @@ -97,7 +97,7 @@ Bus (应用/服务总线) 是一个基础框架、服务套件,它基于Java17 org.aoju bus-all - 6.5.5 + 6.5.6 ``` diff --git a/bus-all/pom.xml b/bus-all/pom.xml index 8500efd6ae..5de15a52d5 100755 --- a/bus-all/pom.xml +++ b/bus-all/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-all - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -223,7 +223,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-base/pom.xml b/bus-base/pom.xml index 5b0a51dd83..7e47157de1 100755 --- a/bus-base/pom.xml +++ b/bus-base/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-base - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,7 +42,7 @@ UTF-8 UTF-8 17 - 2.7.0 + 2.7.2 1.18.24 2.2 @@ -92,7 +92,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-bom/pom.xml b/bus-bom/pom.xml index a9058ae3a3..85c39e0c13 100755 --- a/bus-bom/pom.xml +++ b/bus-bom/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-bom - 6.5.5 + 6.5.6 pom ${project.artifactId} @@ -191,7 +191,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-cache/pom.xml b/bus-cache/pom.xml index dfb1291329..698c41835e 100755 --- a/bus-cache/pom.xml +++ b/bus-cache/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-cache - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,17 +42,16 @@ UTF-8 UTF-8 17 - 2.7.0 + 2.7.2 1.18.24 - 5.0.1 - 4.2.2 + 5.1.0 + 4.2.3 2.4.7 - 3.9.4 - 5.2.1 + 3.9.9 + 5.3.0 31.1-jre - 4.0.65 - 1.2.8 - 8.0.29 + 4.0.66 + 8.0.30 @@ -185,7 +184,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-core/README.md b/bus-core/README.md index 36b449c807..9eb41dca3d 100755 --- a/bus-core/README.md +++ b/bus-core/README.md @@ -14,7 +14,7 @@ org.aoju bus-core - 6.5.5 + 6.5.6 ``` diff --git a/bus-core/pom.xml b/bus-core/pom.xml index 225a294ef9..86b7e333ee 100755 --- a/bus-core/pom.xml +++ b/bus-core/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-core - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -68,7 +68,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-core/src/main/java/org/aoju/bus/core/Version.java b/bus-core/src/main/java/org/aoju/bus/core/Version.java index 978148eeb3..73010b4c56 100644 --- a/bus-core/src/main/java/org/aoju/bus/core/Version.java +++ b/bus-core/src/main/java/org/aoju/bus/core/Version.java @@ -60,7 +60,7 @@ public class Version { * @return 项目的版本号 */ public static String get() { - return "6.5.5.RELEASE"; + return "6.5.6.RELEASE"; } /** diff --git a/bus-core/src/main/java/org/aoju/bus/core/date/Formatter.java b/bus-core/src/main/java/org/aoju/bus/core/date/Formatter.java index 15300d5938..917b3b38c7 100644 --- a/bus-core/src/main/java/org/aoju/bus/core/date/Formatter.java +++ b/bus-core/src/main/java/org/aoju/bus/core/date/Formatter.java @@ -810,7 +810,7 @@ public static DateTime parseUTC(String text) { if (null == text) { return null; } - int length = text.length(); + final int length = text.length(); if (StringKit.contains(text, 'Z')) { if (length == Fields.UTC_PATTERN.length() - 4) { // 格式类似:2020-09-11T06:34:32Z,-4表示减去4个单引号的长度 diff --git a/bus-core/src/main/java/org/aoju/bus/core/lang/Header.java b/bus-core/src/main/java/org/aoju/bus/core/lang/Header.java index 3ecb6711b4..86d24db7b0 100755 --- a/bus-core/src/main/java/org/aoju/bus/core/lang/Header.java +++ b/bus-core/src/main/java/org/aoju/bus/core/lang/Header.java @@ -269,5 +269,9 @@ public class Header { * The header Sec-WebSocket-Version */ public static final String STRICT_TRANSPORT_SECURITY = "Strict-Transport-Security"; + /** + * The header SOAPAction + */ + public static final String SOAPACTION = "SOAPAction"; } diff --git a/bus-core/src/main/java/org/aoju/bus/core/lang/MediaType.java b/bus-core/src/main/java/org/aoju/bus/core/lang/MediaType.java index 8ba262e479..ae039f3af6 100755 --- a/bus-core/src/main/java/org/aoju/bus/core/lang/MediaType.java +++ b/bus-core/src/main/java/org/aoju/bus/core/lang/MediaType.java @@ -304,6 +304,24 @@ public class MediaType { public final static MediaType MULTIPART_RELATED_APPLICATION_DICOM_XML_TYPE = new MediaType("multipart", "related", Collections.singletonMap("type", APPLICATION_DICOM_XML)); + /** + * "text/event-stream;type=\"application/event-stream\"" + */ + public static final String SERVER_SENT_EVENTS = "text/event-stream"; + public static final MediaType SERVER_SENT_EVENTS_TYPE = new MediaType("text", "event-stream"); + + /** + * "application/json-patch+json;type=\"application/json-patch+json\"" + */ + public static final String APPLICATION_JSON_PATCH_JSON = "application/json-patch+json"; + public static final MediaType APPLICATION_JSON_PATCH_JSON_TYPE = new MediaType("application", "json-patch+json"); + + /** + * "application/soap+xml;type=\"application/soap+xml\"" + */ + public static final String APPLICATION_SOAP_XML = "application/soap+xml"; + public static final MediaType APPLICATION_SOAP_XML_TYPE = new MediaType("application", "soap+xml"); + public static final String TOKEN = "([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)"; public static final String QUOTED = "\"([^\"]*)\""; @@ -316,7 +334,6 @@ public class MediaType { public final String mediaType; public Map parameters; - public MediaType() { this(null, MEDIA_TYPE_WILDCARD, MEDIA_TYPE_WILDCARD, null, null); } @@ -325,7 +342,6 @@ public MediaType(String mediaType) { this(mediaType, MEDIA_TYPE_WILDCARD, MEDIA_TYPE_WILDCARD, null, null); } - public MediaType(String type, String subtype) { this(null, type, subtype, null, null); } @@ -347,10 +363,10 @@ public MediaType(String type, String subtype, String charset, Map params) { - this.mediaType = null == mediaType ? APPLICATION_FORM_URLENCODED : mediaType; this.type = null == type ? MEDIA_TYPE_WILDCARD : type; this.subtype = null == subtype ? MEDIA_TYPE_WILDCARD : subtype; this.charset = null == charset ? Charset.DEFAULT_UTF_8 : charset; + this.mediaType = null == mediaType ? this.type + Symbol.C_SLASH + this.subtype + ";charset=" + this.charset : mediaType; if (MapKit.isNotEmpty(params)) { params = new TreeMap((Comparator) (o1, o2) -> o1.compareToIgnoreCase(o2)); } diff --git a/bus-core/src/main/java/org/aoju/bus/core/toolkit/CollKit.java b/bus-core/src/main/java/org/aoju/bus/core/toolkit/CollKit.java index 0012b63c98..bd6b0e5054 100755 --- a/bus-core/src/main/java/org/aoju/bus/core/toolkit/CollKit.java +++ b/bus-core/src/main/java/org/aoju/bus/core/toolkit/CollKit.java @@ -2472,6 +2472,33 @@ public static List addAll(List list, String part, boolean isTrim return list; } + /** + * 一个对象不为空且不存在于该集合中时,加入到该集合中 + *

+     *     null, null = false
+     *     [], null = false
+     *     null, "123" = false
+     *     ["123"], "123" = false
+     *     [], "123" => true
+     *     ["456"], "123" = true
+     *     [Animal{"name": "jack"}], Dog{"name": "jack"} = true
+     * 
+ * + * @param collection 被加入的集合 + * @param object 要添加到集合的对象 + * @param 集合元素类型 + * @param 要添加的元素类型【为集合元素类型的类型或子类型】 + * @return 是否添加成功 + * @author Cloud-Style + */ + public static boolean addIfAbsent(Collection collection, S object) { + if (object == null || collection == null || collection.contains(object)) { + return false; + } + + return collection.add(object); + } + /** * 将另一个列表中的元素加入到列表中,如果列表中已经存在此元素则忽略之 * diff --git a/bus-core/src/main/java/org/aoju/bus/core/toolkit/RandomKit.java b/bus-core/src/main/java/org/aoju/bus/core/toolkit/RandomKit.java index db82d6f6c7..57a01a7aa4 100755 --- a/bus-core/src/main/java/org/aoju/bus/core/toolkit/RandomKit.java +++ b/bus-core/src/main/java/org/aoju/bus/core/toolkit/RandomKit.java @@ -390,6 +390,30 @@ public static String randomString(int length) { return randomString(Normal.LOWER_NUMBER, length); } + /** + * 获得一个随机的字符串 + * + * @param text 随机字符选取的样本 + * @param length 字符串的长度 + * @return 随机字符串 + */ + public static String randomString(String text, int length) { + if (StringKit.isEmpty(text)) { + return Normal.EMPTY; + } + if (length < 1) { + length = 1; + } + + final StringBuilder sb = new StringBuilder(length); + int baseLength = text.length(); + for (int i = 0; i < length; i++) { + int number = randomInt(baseLength); + sb.append(text.charAt(number)); + } + return sb.toString(); + } + /** * 获得一个随机的字符串(只包含数字和大写字符) * @@ -438,30 +462,6 @@ public static String randomNumbers(int length) { return randomString(Normal.NUMBER, length); } - /** - * 获得一个随机的字符串 - * - * @param text 随机字符选取的样本 - * @param length 字符串的长度 - * @return 随机字符串 - */ - public static String randomString(String text, int length) { - if (StringKit.isEmpty(text)) { - return Normal.EMPTY; - } - final StringBuilder sb = new StringBuilder(length); - - if (length < 1) { - length = 1; - } - int baseLength = text.length(); - for (int i = 0; i < length; i++) { - int number = randomInt(baseLength); - sb.append(text.charAt(number)); - } - return sb.toString(); - } - /** * 随机数字,数字为0~9单个数字 * diff --git a/bus-core/src/main/java/org/aoju/bus/core/toolkit/ReflectKit.java b/bus-core/src/main/java/org/aoju/bus/core/toolkit/ReflectKit.java index 35a70fb9c4..4d3c7c6194 100755 --- a/bus-core/src/main/java/org/aoju/bus/core/toolkit/ReflectKit.java +++ b/bus-core/src/main/java/org/aoju/bus/core/toolkit/ReflectKit.java @@ -575,10 +575,12 @@ public static Object[] getFieldsValue(Object object) { /** * 设置字段值 + * 若值类型与字段类型不一致,则会尝试通过 {@link Convert} 进行转换 + * 若字段类型是原始类型而传入的值是 null,则会将字段设置为对应原始类型的默认值(见 {@link ClassKit#getDefaultValue(Class)}) * * @param object 对象,static字段则此处传Class * @param fieldName 字段名 - * @param value 值,值类型必须与字段类型匹配,不会自动转换对象类型 + * @param value 值,当值类型与字段类型不匹配时,会尝试转换 * @throws InstrumentException 包装IllegalAccessException异常 */ public static void setFieldValue(Object object, String fieldName, Object value) throws InstrumentException { @@ -592,10 +594,12 @@ public static void setFieldValue(Object object, String fieldName, Object value) /** * 设置字段值 + * 若值类型与字段类型不一致,则会尝试通过 {@link Convert} 进行转换 + * 若字段类型是原始类型而传入的值是 null,则会将字段设置为对应原始类型的默认值(见 {@link ClassKit#getDefaultValue(Class)}) * * @param object 对象,如果是static字段,此参数为null * @param field 字段 - * @param value 值,值类型必须与字段类型匹配,不会自动转换对象类型 + * @param value 值,当值类型与字段类型不匹配时,会尝试转换 * @throws InstrumentException UtilException 包装IllegalAccessException异常 */ public static void setFieldValue(Object object, Field field, Object value) throws InstrumentException { diff --git a/bus-core/src/main/java/org/aoju/bus/core/toolkit/UriKit.java b/bus-core/src/main/java/org/aoju/bus/core/toolkit/UriKit.java index 00bf980706..be781a2ff2 100755 --- a/bus-core/src/main/java/org/aoju/bus/core/toolkit/UriKit.java +++ b/bus-core/src/main/java/org/aoju/bus/core/toolkit/UriKit.java @@ -1759,12 +1759,7 @@ public URL toURL(URLStreamHandler handler) { */ public URI toURI() { try { - return new URI( - getSchemeWithDefault(), - getAuthority(), - getPathString(), - getQueryString(), - getFragmentEncoded()); + return toURL().toURI(); } catch (URISyntaxException e) { return null; } diff --git a/bus-cron/pom.xml b/bus-cron/pom.xml index f64e8cbdb1..0fab433a96 100755 --- a/bus-cron/pom.xml +++ b/bus-cron/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-cron - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-crypto/pom.xml b/bus-crypto/pom.xml index 559ea1a720..4c32e5d199 100755 --- a/bus-crypto/pom.xml +++ b/bus-crypto/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-crypto - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -79,7 +79,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-crypto/src/main/java/org/aoju/bus/crypto/Builder.java b/bus-crypto/src/main/java/org/aoju/bus/crypto/Builder.java index 0aab679ff8..a1e26fccf8 100644 --- a/bus-crypto/src/main/java/org/aoju/bus/crypto/Builder.java +++ b/bus-crypto/src/main/java/org/aoju/bus/crypto/Builder.java @@ -575,7 +575,7 @@ public static String sha256Hex(File file) { * @return {@link HMac} */ public static HMac hmac(Algorithm algorithm, String key) { - return new HMac(algorithm, StringKit.bytes(key)); + return new HMac(algorithm, StringKit.isNotEmpty(key) ? StringKit.bytes(key) : null); } /** @@ -586,6 +586,9 @@ public static HMac hmac(Algorithm algorithm, String key) { * @return {@link HMac} */ public static HMac hmac(Algorithm algorithm, byte[] key) { + if (ArrayKit.isEmpty(key)) { + key = generateKey(algorithm.getValue()).getEncoded(); + } return new HMac(algorithm, key); } @@ -597,6 +600,9 @@ public static HMac hmac(Algorithm algorithm, byte[] key) { * @return {@link HMac} */ public static HMac hmac(Algorithm algorithm, SecretKey key) { + if (ObjectKit.isNull(key)) { + key = generateKey(algorithm.getValue()); + } return new HMac(algorithm, key); } @@ -610,7 +616,7 @@ public static HMac hmac(Algorithm algorithm, SecretKey key) { * @return {@link HMac} */ public static HMac hmacMd5(String key) { - return hmacMd5(StringKit.bytes(key)); + return hmacMd5(StringKit.isNotEmpty(key) ? StringKit.bytes(key) : null); } /** @@ -623,6 +629,9 @@ public static HMac hmacMd5(String key) { * @return {@link HMac} */ public static HMac hmacMd5(byte[] key) { + if (ArrayKit.isEmpty(key)) { + key = generateKey(Algorithm.HMACMD5.getValue()).getEncoded(); + } return new HMac(Algorithm.HMACMD5, key); } @@ -648,7 +657,7 @@ public static HMac hmacMd5() { * @return {@link HMac} */ public static HMac hmacSha1(String key) { - return hmacSha1(StringKit.bytes(key)); + return hmacSha1(StringKit.isNotEmpty(key) ? StringKit.bytes(key) : null); } /** @@ -661,6 +670,9 @@ public static HMac hmacSha1(String key) { * @return {@link HMac} */ public static HMac hmacSha1(byte[] key) { + if (ArrayKit.isEmpty(key)) { + key = generateKey(Algorithm.HMACMD5.getValue()).getEncoded(); + } return new HMac(Algorithm.HMACSHA1, key); } @@ -686,7 +698,7 @@ public static HMac hmacSha1() { * @return {@link HMac} */ public static HMac hmacSha256(String key) { - return hmacSha256(StringKit.bytes(key)); + return hmacSha256(StringKit.isNotEmpty(key) ? StringKit.bytes(key) : null); } /** @@ -699,6 +711,9 @@ public static HMac hmacSha256(String key) { * @return {@link HMac} */ public static HMac hmacSha256(byte[] key) { + if (ArrayKit.isEmpty(key)) { + key = generateKey(Algorithm.HMACMD5.getValue()).getEncoded(); + } return new HMac(Algorithm.HMACSHA256, key); } diff --git a/bus-extra/pom.xml b/bus-extra/pom.xml index d4d04d43e0..c1b0957743 100644 --- a/bus-extra/pom.xml +++ b/bus-extra/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-extra - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -44,22 +44,22 @@ 17 1.18.24 1.2.83 - 2.9.0 + 2.9.1 2.13.3 1.1.8 2.5.1 2.0.3.RELEASE 1.0.0 0.3.1 - 0.1.54 - 0.33.0 + 0.1.55 + 0.34.0 3.5.0 3.8.0 5.1.1 1.21 1.0.6 - 1.3.0 - 1.1.7.6 + 1.8.0 + 1.1.8.4 4.0.4 @@ -178,10 +178,9 @@ true - net.jpountz.lz4 - lz4 + org.lz4 + lz4-java ${lz4.version} - true org.xerial.snappy @@ -211,7 +210,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-gitlab/README.md b/bus-gitlab/README.md index 6e6c8b3ee2..37a7c9798a 100755 --- a/bus-gitlab/README.md +++ b/bus-gitlab/README.md @@ -70,7 +70,7 @@ dependencies { org.aoju bus-gitlab - 6.5.5 + 6.5.6 ``` diff --git a/bus-gitlab/pom.xml b/bus-gitlab/pom.xml index e0f044374f..d375a4ad68 100755 --- a/bus-gitlab/pom.xml +++ b/bus-gitlab/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-gitlab - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -44,7 +44,7 @@ 17 2.12.4 2.36 - 5.0.0 + 4.0.4 @@ -105,7 +105,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-gitlab/src/main/java/org/aoju/bus/gitlab/HookManager.java b/bus-gitlab/src/main/java/org/aoju/bus/gitlab/HookManager.java index 157ea82000..2a35ccf1e8 100644 --- a/bus-gitlab/src/main/java/org/aoju/bus/gitlab/HookManager.java +++ b/bus-gitlab/src/main/java/org/aoju/bus/gitlab/HookManager.java @@ -25,7 +25,7 @@ ********************************************************************************/ package org.aoju.bus.gitlab; -import jakarta.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequest; /** * This interface provides a base class handler for processing GitLab Web Hook and System Hook callouts. diff --git a/bus-gitlab/src/main/java/org/aoju/bus/gitlab/hooks/SystemHookManager.java b/bus-gitlab/src/main/java/org/aoju/bus/gitlab/hooks/SystemHookManager.java index c74295d973..6370d27643 100644 --- a/bus-gitlab/src/main/java/org/aoju/bus/gitlab/hooks/SystemHookManager.java +++ b/bus-gitlab/src/main/java/org/aoju/bus/gitlab/hooks/SystemHookManager.java @@ -27,12 +27,12 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; -import jakarta.servlet.http.HttpServletRequest; import org.aoju.bus.gitlab.GitLabApiException; import org.aoju.bus.gitlab.HookManager; import org.aoju.bus.gitlab.support.HttpRequest; import org.aoju.bus.gitlab.support.JacksonJson; +import javax.servlet.http.HttpServletRequest; import java.io.InputStreamReader; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; diff --git a/bus-gitlab/src/main/java/org/aoju/bus/gitlab/hooks/web/WebHookManager.java b/bus-gitlab/src/main/java/org/aoju/bus/gitlab/hooks/web/WebHookManager.java index 50bfa6bffb..caa6c40215 100644 --- a/bus-gitlab/src/main/java/org/aoju/bus/gitlab/hooks/web/WebHookManager.java +++ b/bus-gitlab/src/main/java/org/aoju/bus/gitlab/hooks/web/WebHookManager.java @@ -25,12 +25,12 @@ ********************************************************************************/ package org.aoju.bus.gitlab.hooks.web; -import jakarta.servlet.http.HttpServletRequest; import org.aoju.bus.gitlab.GitLabApiException; import org.aoju.bus.gitlab.HookManager; import org.aoju.bus.gitlab.support.HttpRequest; import org.aoju.bus.gitlab.support.JacksonJson; +import javax.servlet.http.HttpServletRequest; import java.io.InputStreamReader; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; diff --git a/bus-gitlab/src/main/java/org/aoju/bus/gitlab/support/HttpRequest.java b/bus-gitlab/src/main/java/org/aoju/bus/gitlab/support/HttpRequest.java index 0de0a49091..246e646a7b 100644 --- a/bus-gitlab/src/main/java/org/aoju/bus/gitlab/support/HttpRequest.java +++ b/bus-gitlab/src/main/java/org/aoju/bus/gitlab/support/HttpRequest.java @@ -25,9 +25,8 @@ ********************************************************************************/ package org.aoju.bus.gitlab.support; -import jakarta.servlet.http.Cookie; -import jakarta.servlet.http.HttpServletRequest; - +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; diff --git a/bus-goalie/pom.xml b/bus-goalie/pom.xml index 2229639970..6e785b5b92 100644 --- a/bus-goalie/pom.xml +++ b/bus-goalie/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-goalie - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,7 +42,7 @@ UTF-8 UTF-8 17 - 2.7.0 + 2.7.2 1.18.24 31.1-jre @@ -109,7 +109,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-health/pom.xml b/bus-health/pom.xml index 0629a34e9d..3972c86f53 100755 --- a/bus-health/pom.xml +++ b/bus-health/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-health - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,7 +42,7 @@ UTF-8 UTF-8 17 - 5.12.0 + 5.12.1 @@ -79,7 +79,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-http/README.md b/bus-http/README.md index 05f5c63eaf..31f2cbd3a9 100644 --- a/bus-http/README.md +++ b/bus-http/README.md @@ -115,7 +115,7 @@ body 的内容类型,关于 MediaType 的更多信息可以查看 RFC 2045,R RequestBody requestBody = new RequestBody() { @Override - public MediaType contentType() { + public MediaType mediaType() { return MediaType.valueOf("text/x-markdown; charsets=utf-8"); } diff --git a/bus-http/pom.xml b/bus-http/pom.xml index aaa399cf5b..15f34056c0 100755 --- a/bus-http/pom.xml +++ b/bus-http/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-http - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -93,7 +93,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-http/src/main/java/org/aoju/bus/http/Httpv.java b/bus-http/src/main/java/org/aoju/bus/http/Httpv.java index 513714a140..bc14585d2a 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/Httpv.java +++ b/bus-http/src/main/java/org/aoju/bus/http/Httpv.java @@ -442,7 +442,7 @@ private static void addCopyInterceptor(Httpd.Builder builder) { // 若是下载文件,则必须指定在 IO 线程操作 return response; } - ResponseBody newBody = ResponseBody.create(body.contentType(), body.bytes()); + ResponseBody newBody = ResponseBody.create(body.mediaType(), body.bytes()); return response.newBuilder().body(newBody).build(); }); } diff --git a/bus-http/src/main/java/org/aoju/bus/http/Response.java b/bus-http/src/main/java/org/aoju/bus/http/Response.java index 86aae2404b..fd28359072 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/Response.java +++ b/bus-http/src/main/java/org/aoju/bus/http/Response.java @@ -176,7 +176,7 @@ public ResponseBody peekBody(long byteCount) throws IOException { Buffer buffer = new Buffer(); peeked.request(byteCount); buffer.write(peeked, Math.min(byteCount, peeked.getBuffer().size())); - return ResponseBody.create(body.contentType(), buffer.size(), buffer); + return ResponseBody.create(body.mediaType(), buffer.size(), buffer); } /** diff --git a/bus-http/src/main/java/org/aoju/bus/http/accord/Exchange.java b/bus-http/src/main/java/org/aoju/bus/http/accord/Exchange.java index 3d82a4a4ac..84307c9d0d 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/accord/Exchange.java +++ b/bus-http/src/main/java/org/aoju/bus/http/accord/Exchange.java @@ -95,10 +95,10 @@ public void writeRequestHeaders(Request request) throws IOException { public Sink createRequestBody(Request request, boolean duplex) throws IOException { this.duplex = duplex; - long contentLength = request.body().contentLength(); + long length = request.body().length(); eventListener.requestBodyStart(call); - Sink rawRequestBody = httpCodec.createRequestBody(request, contentLength); - return new RequestBodySink(rawRequestBody, contentLength); + Sink rawRequestBody = httpCodec.createRequestBody(request, length); + return new RequestBodySink(rawRequestBody, length); } public void flushRequest() throws IOException { @@ -146,11 +146,11 @@ public void responseHeadersEnd(Response response) { public ResponseBody openResponseBody(Response response) throws IOException { try { eventListener.responseBodyStart(call); - String contentType = response.header("Content-Type"); - long contentLength = httpCodec.reportedContentLength(response); + String mediaType = response.header("Content-Type"); + long length = httpCodec.reportedContentLength(response); Source rawSource = httpCodec.openResponseBodySource(response); - ResponseBodySource source = new ResponseBodySource(rawSource, contentLength); - return new RealResponseBody(contentType, contentLength, IoKit.buffer(source)); + ResponseBodySource source = new ResponseBodySource(rawSource, length); + return new RealResponseBody(mediaType, length, IoKit.buffer(source)); } catch (IOException e) { eventListener.responseFailed(call, e); trackFailure(e); diff --git a/bus-http/src/main/java/org/aoju/bus/http/bodys/FormBody.java b/bus-http/src/main/java/org/aoju/bus/http/bodys/FormBody.java index df4e3c7434..5b0f2b6667 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/bodys/FormBody.java +++ b/bus-http/src/main/java/org/aoju/bus/http/bodys/FormBody.java @@ -72,12 +72,12 @@ public String value(int index) { } @Override - public MediaType contentType() { + public MediaType mediaType() { return MediaType.APPLICATION_FORM_URLENCODED_TYPE; } @Override - public long contentLength() { + public long length() { return writeOrCountBytes(null, true); } diff --git a/bus-http/src/main/java/org/aoju/bus/http/bodys/MultipartBody.java b/bus-http/src/main/java/org/aoju/bus/http/bodys/MultipartBody.java index 2d68ca4cf2..49e4b2b080 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/bodys/MultipartBody.java +++ b/bus-http/src/main/java/org/aoju/bus/http/bodys/MultipartBody.java @@ -53,14 +53,14 @@ public class MultipartBody extends RequestBody { private final ByteString boundary; private final MediaType originalType; - private final MediaType contentType; + private final MediaType mediaType; private final List parts; private long contentLength = -1L; - MultipartBody(ByteString boundary, MediaType type, List parts) { + MultipartBody(ByteString boundary, MediaType mediaType, List parts) { this.boundary = boundary; - this.originalType = type; - this.contentType = MediaType.valueOf(type + "; boundary=" + boundary.utf8()); + this.originalType = mediaType; + this.mediaType = MediaType.valueOf(mediaType.toString() + "; boundary=" + boundary.utf8()); this.parts = org.aoju.bus.http.Builder.immutableList(parts); } @@ -122,12 +122,12 @@ public Part part(int index) { * A combination of {@link #type()} and {@link #boundary()}. */ @Override - public MediaType contentType() { - return contentType; + public MediaType mediaType() { + return mediaType; } @Override - public long contentLength() throws IOException { + public long length() throws IOException { long result = contentLength; if (result != -1L) return result; return contentLength = writeOrCountBytes(null, true); @@ -174,14 +174,14 @@ private long writeOrCountBytes(BufferSink sink, boolean countBytes) throws IOExc } } - MediaType contentType = body.contentType(); - if (null != contentType) { + MediaType mediaType = body.mediaType(); + if (null != mediaType) { sink.writeUtf8(Header.CONTENT_TYPE + ": ") - .writeUtf8(contentType.toString()) + .writeUtf8(mediaType.toString()) .write(CRLF); } - long contentLength = body.contentLength(); + long contentLength = body.length(); if (contentLength != -1) { sink.writeUtf8("Content-Length: ") .writeDecimalLong(contentLength) diff --git a/bus-http/src/main/java/org/aoju/bus/http/bodys/RealResponseBody.java b/bus-http/src/main/java/org/aoju/bus/http/bodys/RealResponseBody.java index a41af8cbf4..fed3fb368c 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/bodys/RealResponseBody.java +++ b/bus-http/src/main/java/org/aoju/bus/http/bodys/RealResponseBody.java @@ -40,25 +40,25 @@ public class RealResponseBody extends ResponseBody { * 使用字符串避免在需要时才解析内容类型 * 这也避免了由格式不正确的内容类型引起的问题 */ - private final String contentTypeString; - private final long contentLength; + private final String mediaType; + private final long length; private final BufferSource source; public RealResponseBody( - String contentTypeString, long contentLength, BufferSource source) { - this.contentTypeString = contentTypeString; - this.contentLength = contentLength; + String mediaType, long length, BufferSource source) { + this.mediaType = mediaType; + this.length = length; this.source = source; } @Override - public MediaType contentType() { - return null != contentTypeString ? MediaType.valueOf(contentTypeString) : null; + public MediaType mediaType() { + return null != mediaType ? MediaType.valueOf(mediaType) : null; } @Override - public long contentLength() { - return contentLength; + public long length() { + return length; } @Override diff --git a/bus-http/src/main/java/org/aoju/bus/http/bodys/RequestBody.java b/bus-http/src/main/java/org/aoju/bus/http/bodys/RequestBody.java index 1dd2b56c01..af68e65234 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/bodys/RequestBody.java +++ b/bus-http/src/main/java/org/aoju/bus/http/bodys/RequestBody.java @@ -46,43 +46,40 @@ public abstract class RequestBody { /** * 返回传输{@code content}的新请求体。 - * 如果{@code contentType}是非空且缺少字符集,则使用UTF-8 + * 如果{@code mediaType}是非空且缺少字符集,则使用UTF-8 * - * @param contentType 请求类型 - * @param content 内容 + * @param mediaType 请求类型 + * @param content 内容 * @return 传输请求体 */ - public static RequestBody create(MediaType contentType, String content) { + public static RequestBody create(MediaType mediaType, String content) { java.nio.charset.Charset charset = Charset.UTF_8; - if (null != contentType) { - charset = contentType.charset(); - if (null == charset) { - charset = Charset.UTF_8; - contentType = MediaType.valueOf(contentType + "; charset=utf-8"); - } + if (null != mediaType) { + charset = null != mediaType.charset() ? mediaType.charset() : Charset.UTF_8; } + byte[] bytes = content.getBytes(charset); - return create(contentType, bytes); + return create(mediaType, bytes); } /** * 返回发送{@code content}的新请求体 * - * @param contentType 请求类型 - * @param content 内容 + * @param mediaType 请求类型 + * @param content 内容 * @return 传输请求体 */ public static RequestBody create( - final MediaType contentType, + final MediaType mediaType, final ByteString content) { return new RequestBody() { @Override - public MediaType contentType() { - return contentType; + public MediaType mediaType() { + return mediaType; } @Override - public long contentLength() { + public long length() { return content.size(); } @@ -96,24 +93,24 @@ public void writeTo(BufferSink sink) throws IOException { /** * 发送{@code content}的新请求体 * - * @param contentType 请求类型 - * @param content 内容 + * @param mediaType 媒体类型 + * @param content 内容 * @return 传输请求体 */ - public static RequestBody create(final MediaType contentType, final byte[] content) { - return create(contentType, content, 0, content.length); + public static RequestBody create(final MediaType mediaType, final byte[] content) { + return create(mediaType, content, 0, content.length); } /** * 发送{@code content}的新请求体 * - * @param contentType 请求类型 - * @param content 内容 - * @param offset 偏移量 - * @param byteCount 当前大小 + * @param mediaType 媒体类型 + * @param content 内容 + * @param offset 偏移量 + * @param byteCount 当前大小 * @return 传输请求体 */ - public static RequestBody create(final MediaType contentType, final byte[] content, + public static RequestBody create(final MediaType mediaType, final byte[] content, final int offset, final int byteCount) { if (null == content) { throw new NullPointerException("content == null"); @@ -121,12 +118,12 @@ public static RequestBody create(final MediaType contentType, final byte[] conte Builder.checkOffsetAndCount(content.length, offset, byteCount); return new RequestBody() { @Override - public MediaType contentType() { - return contentType; + public MediaType mediaType() { + return mediaType; } @Override - public long contentLength() { + public long length() { return byteCount; } @@ -140,23 +137,23 @@ public void writeTo(BufferSink sink) throws IOException { /** * 新的请求体,该请求体传输{@code file}的内容 * - * @param contentType 请求类型 - * @param file 文件 + * @param mediaType 请求类型 + * @param file 文件 * @return 传输请求体 */ - public static RequestBody create(final MediaType contentType, final File file) { + public static RequestBody create(final MediaType mediaType, final File file) { if (null == file) { throw new NullPointerException("file == null"); } return new RequestBody() { @Override - public MediaType contentType() { - return contentType; + public MediaType mediaType() { + return mediaType; } @Override - public long contentLength() { + public long length() { return file.length(); } @@ -172,7 +169,7 @@ public void writeTo(BufferSink sink) throws IOException { /** * @return 返回此主体的媒体类型 */ - public abstract MediaType contentType(); + public abstract MediaType mediaType(); /** * 返回调用{@link #writeTo}时写入{@code sink}的字节数,如果该计数未知,则返回-1 @@ -180,7 +177,7 @@ public void writeTo(BufferSink sink) throws IOException { * @return 计数信息 * @throws IOException 异常 */ - public long contentLength() throws IOException { + public long length() throws IOException { return -1; } @@ -242,4 +239,5 @@ public boolean isDuplex() { public boolean isOneShot() { return false; } -} + +} \ No newline at end of file diff --git a/bus-http/src/main/java/org/aoju/bus/http/bodys/ResponseBody.java b/bus-http/src/main/java/org/aoju/bus/http/bodys/ResponseBody.java index 1292159099..c108be9158 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/bodys/ResponseBody.java +++ b/bus-http/src/main/java/org/aoju/bus/http/bodys/ResponseBody.java @@ -70,59 +70,55 @@ public abstract class ResponseBody implements Closeable { private Reader reader; /** - * 返回一个传输{@code content}的新响应体。如果{@code contentType}是非空且缺少字符集,则使用UTF-8 + * 返回一个传输{@code content}的新响应体。如果{@code mediaType}是非空且缺少字符集,则使用UTF-8 * - * @param contentType 媒体类型 - * @param content 内容 + * @param mediaType 媒体类型 + * @param content 内容 * @return 新响应体 */ - public static ResponseBody create(MediaType contentType, String content) { + public static ResponseBody create(MediaType mediaType, String content) { java.nio.charset.Charset charset = Charset.UTF_8; - if (null != contentType) { - charset = contentType.charset(); - if (null == charset) { - charset = Charset.UTF_8; - contentType = MediaType.valueOf(contentType + "; charset=utf-8"); - } + if (null != mediaType) { + charset = null != mediaType.charset() ? mediaType.charset() : Charset.UTF_8; } Buffer buffer = new Buffer().writeString(content, charset); - return create(contentType, buffer.size(), buffer); + return create(mediaType, buffer.size(), buffer); } /** * 新的响应体,它传输{@code content} * - * @param contentType 媒体类型 - * @param content 内容 + * @param mediaType 媒体类型 + * @param content 内容 * @return 新响应体 */ - public static ResponseBody create(final MediaType contentType, byte[] content) { + public static ResponseBody create(final MediaType mediaType, byte[] content) { Buffer buffer = new Buffer().write(content); - return create(contentType, content.length, buffer); + return create(mediaType, content.length, buffer); } /** * 新的响应体,它传输{@code content} * - * @param contentType 媒体类型 - * @param content 内容 + * @param mediaType 媒体类型 + * @param content 内容 * @return 新响应体 */ - public static ResponseBody create(MediaType contentType, ByteString content) { + public static ResponseBody create(MediaType mediaType, ByteString content) { Buffer buffer = new Buffer().write(content); - return create(contentType, content.size(), buffer); + return create(mediaType, content.size(), buffer); } /** * 新的响应体,它传输{@code content} * - * @param contentType 媒体类型 - * @param contentLength 内容大小 - * @param content 内容 + * @param mediaType 媒体类型 + * @param length 内容大小 + * @param content 内容 * @return 新响应体 */ - public static ResponseBody create(final MediaType contentType, - final long contentLength, + public static ResponseBody create(final MediaType mediaType, + final long length, final BufferSource content) { if (null == content) { throw new NullPointerException("source == null"); @@ -130,13 +126,13 @@ public static ResponseBody create(final MediaType contentType, return new ResponseBody() { @Override - public MediaType contentType() { - return contentType; + public MediaType mediaType() { + return mediaType; } @Override - public long contentLength() { - return contentLength; + public long length() { + return length; } @Override @@ -146,13 +142,13 @@ public BufferSource source() { }; } - public abstract MediaType contentType(); + public abstract MediaType mediaType(); /** * Returns the number of bytes in that will returned by {@link #bytes}, or {@link #byteStream}, or * -1 if unknown. */ - public abstract long contentLength(); + public abstract long length(); public final InputStream byteStream() { return source().inputStream(); @@ -168,7 +164,7 @@ public final InputStream byteStream() { * possibility for your response. */ public final byte[] bytes() throws IOException { - long contentLength = contentLength(); + long contentLength = length(); if (contentLength > Integer.MAX_VALUE) { throw new IOException("Cannot buffer entire body for content length: " + contentLength); } @@ -226,8 +222,8 @@ public final String string() throws IOException { } private java.nio.charset.Charset charset() { - MediaType contentType = contentType(); - return null != contentType ? contentType.charset(Charset.UTF_8) : Charset.UTF_8; + MediaType mediaType = mediaType(); + return null != mediaType ? mediaType.charset(Charset.UTF_8) : Charset.UTF_8; } @Override diff --git a/bus-http/src/main/java/org/aoju/bus/http/cache/Cache.java b/bus-http/src/main/java/org/aoju/bus/http/cache/Cache.java index 31b0a392bd..d121b08ca7 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/cache/Cache.java +++ b/bus-http/src/main/java/org/aoju/bus/http/cache/Cache.java @@ -594,20 +594,20 @@ public boolean matches(Request request, Response response) { } public Response response(DiskLruCache.Snapshot snapshot) { - String contentType = responseHeaders.get(Header.CONTENT_TYPE); - String contentLength = responseHeaders.get(Header.CONTENT_LENGTH); - Request cacheRequest = new Request.Builder() + String mediaType = responseHeaders.get(Header.CONTENT_TYPE); + String length = responseHeaders.get(Header.CONTENT_LENGTH); + Request request = new Request.Builder() .url(url) .method(requestMethod, null) .headers(varyHeaders) .build(); return new Response.Builder() - .request(cacheRequest) + .request(request) .protocol(protocol) .code(code) .message(message) .headers(responseHeaders) - .body(new CacheResponseBody(snapshot, contentType, contentLength)) + .body(new CacheResponseBody(snapshot, mediaType, length)) .handshake(handshake) .sentRequestAtMillis(sentRequestMillis) .receivedResponseAtMillis(receivedResponseMillis) @@ -618,14 +618,14 @@ public Response response(DiskLruCache.Snapshot snapshot) { private static class CacheResponseBody extends ResponseBody { final DiskLruCache.Snapshot snapshot; private final BufferSource bodySource; - private final String contentType; - private final String contentLength; + private final String mediaType; + private final String length; CacheResponseBody(final DiskLruCache.Snapshot snapshot, - String contentType, String contentLength) { + String mediaType, String length) { this.snapshot = snapshot; - this.contentType = contentType; - this.contentLength = contentLength; + this.mediaType = mediaType; + this.length = length; Source source = snapshot.getSource(ENTRY_BODY); bodySource = IoKit.buffer(new AssignSource(source) { @@ -638,14 +638,14 @@ public void close() throws IOException { } @Override - public MediaType contentType() { - return null != contentType ? MediaType.valueOf(contentType) : null; + public MediaType mediaType() { + return null != mediaType ? MediaType.valueOf(mediaType) : null; } @Override - public long contentLength() { + public long length() { try { - return null != contentLength ? Long.parseLong(contentLength) : -1; + return null != length ? Long.parseLong(length) : -1; } catch (NumberFormatException e) { return -1; } diff --git a/bus-http/src/main/java/org/aoju/bus/http/cache/CacheInterceptor.java b/bus-http/src/main/java/org/aoju/bus/http/cache/CacheInterceptor.java index b9d8e7cd64..f1b6378556 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/cache/CacheInterceptor.java +++ b/bus-http/src/main/java/org/aoju/bus/http/cache/CacheInterceptor.java @@ -292,10 +292,10 @@ public void close() throws IOException { } }; - String contentType = response.header(Header.CONTENT_TYPE); - long contentLength = response.body().contentLength(); + String mediaType = response.header(Header.CONTENT_TYPE); + long contentLength = response.body().length(); return response.newBuilder() - .body(new RealResponseBody(contentType, contentLength, IoKit.buffer(cacheWritingSource))) + .body(new RealResponseBody(mediaType, contentLength, IoKit.buffer(cacheWritingSource))) .build(); } diff --git a/bus-http/src/main/java/org/aoju/bus/http/metric/http/BridgeInterceptor.java b/bus-http/src/main/java/org/aoju/bus/http/metric/http/BridgeInterceptor.java index 608c89ccc2..090d3ed28a 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/metric/http/BridgeInterceptor.java +++ b/bus-http/src/main/java/org/aoju/bus/http/metric/http/BridgeInterceptor.java @@ -57,19 +57,19 @@ public BridgeInterceptor(CookieJar cookieJar) { @Override public Response intercept(Chain chain) throws IOException { - Request userRequest = chain.request(); - Request.Builder requestBuilder = userRequest.newBuilder(); + Request request = chain.request(); + Request.Builder requestBuilder = request.newBuilder(); - RequestBody body = userRequest.body(); + RequestBody body = request.body(); if (null != body) { - MediaType contentType = body.contentType(); - if (null != contentType) { - requestBuilder.header(Header.CONTENT_TYPE, contentType.toString()); + MediaType mediaType = body.mediaType(); + if (null != mediaType) { + requestBuilder.header(Header.CONTENT_TYPE, mediaType.toString()); } - long contentLength = body.contentLength(); - if (contentLength != -1) { - requestBuilder.header(Header.CONTENT_LENGTH, Long.toString(contentLength)); + long length = body.length(); + if (length != -1) { + requestBuilder.header(Header.CONTENT_LENGTH, Long.toString(length)); requestBuilder.removeHeader(Header.TRANSFER_ENCODING); } else { requestBuilder.header(Header.TRANSFER_ENCODING, "chunked"); @@ -77,38 +77,38 @@ public Response intercept(Chain chain) throws IOException { } } - if (null == userRequest.header(Header.HOST)) { - requestBuilder.header(Header.HOST, Builder.hostHeader(userRequest.url(), false)); + if (null == request.header(Header.HOST)) { + requestBuilder.header(Header.HOST, Builder.hostHeader(request.url(), false)); } - if (null == userRequest.header(Header.CONNECTION)) { + if (null == request.header(Header.CONNECTION)) { requestBuilder.header(Header.CONNECTION, Header.KEEP_ALIVE); } // If we add an "Accept-Encoding: gzip" header field we're responsible for also decompressing // the transfer stream. boolean transparentGzip = false; - if (null == userRequest.header(Header.ACCEPT_ENCODING) - && null == userRequest.header("Range")) { + if (null == request.header(Header.ACCEPT_ENCODING) + && null == request.header("Range")) { transparentGzip = true; requestBuilder.header(Header.ACCEPT_ENCODING, "gzip"); } - List cookies = cookieJar.loadForRequest(userRequest.url()); + List cookies = cookieJar.loadForRequest(request.url()); if (!cookies.isEmpty()) { requestBuilder.header(Header.COOKIE, cookieHeader(cookies)); } - if (null == userRequest.header(Header.USER_AGENT)) { + if (null == request.header(Header.USER_AGENT)) { requestBuilder.header(Header.USER_AGENT, "Httpd/" + Version.all()); } Response networkResponse = chain.proceed(requestBuilder.build()); - Headers.receiveHeaders(cookieJar, userRequest.url(), networkResponse.headers()); + Headers.receiveHeaders(cookieJar, request.url(), networkResponse.headers()); Response.Builder responseBuilder = networkResponse.newBuilder() - .request(userRequest); + .request(request); if (transparentGzip && "gzip".equalsIgnoreCase(networkResponse.header(Header.CONTENT_ENCODING)) @@ -119,8 +119,8 @@ public Response intercept(Chain chain) throws IOException { .removeAll(Header.CONTENT_LENGTH) .build(); responseBuilder.headers(strippedHeaders); - String contentType = networkResponse.header(Header.CONTENT_TYPE); - responseBuilder.body(new RealResponseBody(contentType, -1L, IoKit.buffer(responseBody))); + String mediaType = networkResponse.header(Header.CONTENT_TYPE); + responseBuilder.body(new RealResponseBody(mediaType, -1L, IoKit.buffer(responseBody))); } return responseBuilder.build(); diff --git a/bus-http/src/main/java/org/aoju/bus/http/metric/http/CallServerInterceptor.java b/bus-http/src/main/java/org/aoju/bus/http/metric/http/CallServerInterceptor.java index e4693997d1..89b87b71f3 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/metric/http/CallServerInterceptor.java +++ b/bus-http/src/main/java/org/aoju/bus/http/metric/http/CallServerInterceptor.java @@ -150,9 +150,9 @@ public Response intercept(Chain chain) throws IOException { exchange.noNewExchangesOnConnection(); } - if ((code == 204 || code == 205) && response.body().contentLength() > 0) { + if ((code == 204 || code == 205) && response.body().length() > 0) { throw new ProtocolException( - "HTTP " + code + " had non-zero Content-Length: " + response.body().contentLength()); + "HTTP " + code + " had non-zero Content-Length: " + response.body().length()); } return response; diff --git a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/CoverHttp.java b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/CoverHttp.java index c5c2a0f1bc..4ad14164c3 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/CoverHttp.java +++ b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/CoverHttp.java @@ -570,7 +570,7 @@ protected Request prepareRequest(String method) { private long contentLength(RequestBody reqBody) { try { - return reqBody.contentLength(); + return reqBody.length(); } catch (IOException e) { throw new InstrumentException("Cannot get the length of the request body", e); } @@ -741,8 +741,8 @@ protected CoverResult timeoutResult() { public Charset charset(Response response) { ResponseBody b = response.body(); - MediaType type = null != b ? b.contentType() : null; - return null != type ? type.charset(charset) : charset; + MediaType mediaType = null != b ? b.mediaType() : null; + return null != mediaType ? mediaType.charset(charset) : charset; } static class FilePara { diff --git a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/ProgressBody.java b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/ProgressBody.java index a2517c2edd..75cded1ee3 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/ProgressBody.java +++ b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/ProgressBody.java @@ -61,13 +61,13 @@ public ProgressBody(RequestBody requestBody, Callback onProcess, Execu } @Override - public long contentLength() { + public long length() { return progress.getTotalBytes(); } @Override - public MediaType contentType() { - return requestBody.contentType(); + public MediaType mediaType() { + return requestBody.mediaType(); } @Override diff --git a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/ResultBody.java b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/ResultBody.java index 90c55dcca7..f12290563c 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/ResultBody.java +++ b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpv/ResultBody.java @@ -99,7 +99,7 @@ public List toList(Class type) { public MediaType getType() { ResponseBody body = response.body(); if (null != body) { - return body.contentType(); + return body.mediaType(); } return null; } @@ -108,7 +108,7 @@ public MediaType getType() { public long getLength() { ResponseBody body = response.body(); if (null != body) { - return body.contentLength(); + return body.length(); } return 0; } diff --git a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpz/FileInterceptor.java b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpz/FileInterceptor.java index f5aa9f814a..8321ef7ff9 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpz/FileInterceptor.java +++ b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpz/FileInterceptor.java @@ -67,13 +67,13 @@ public DownloadFileProgressResponseBody(ResponseBody body, ProgressListener prog } @Override - public MediaType contentType() { - return body.contentType(); + public MediaType mediaType() { + return body.mediaType(); } @Override - public long contentLength() { - return body.contentLength(); + public long length() { + return body.length(); } @Override @@ -95,7 +95,7 @@ public long read(Buffer sink, long byteCount) throws IOException { if (!isFinish) { downloadLenth += bytesRead; } - progressListener.updateProgress(downloadLenth, body.contentLength(), isFinish); + progressListener.updateProgress(downloadLenth, body.length(), isFinish); return bytesRead; } }; diff --git a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpz/HttpRequest.java b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpz/HttpRequest.java index a87f5d57d3..088b8dda8a 100644 --- a/bus-http/src/main/java/org/aoju/bus/http/plugin/httpz/HttpRequest.java +++ b/bus-http/src/main/java/org/aoju/bus/http/plugin/httpz/HttpRequest.java @@ -90,18 +90,18 @@ protected HttpRequest(String url, Object tag, Map params, appendHeaders(); } - public static RequestBody createRequestBody(final MediaType contentType, final InputStream is) { + public static RequestBody createRequestBody(final MediaType mediaType, final InputStream is) { if (null == is) throw new NullPointerException("is == null"); return new RequestBody() { @Override - public MediaType contentType() { - return contentType; + public MediaType mediaType() { + return mediaType; } @Override - public long contentLength() { + public long length() { try { return is.available(); } catch (IOException e) { diff --git a/bus-image/pom.xml b/bus-image/pom.xml index 9ae817ac31..a697f9d690 100755 --- a/bus-image/pom.xml +++ b/bus-image/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-image - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -80,7 +80,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-limiter/pom.xml b/bus-limiter/pom.xml index 1b81d2182b..55abf3f3fa 100755 --- a/bus-limiter/pom.xml +++ b/bus-limiter/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-limiter - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,8 +42,8 @@ UTF-8 UTF-8 17 - 2.7.0 - 5.2.1 + 2.7.2 + 5.3.0 3.17.4 31.1-jre @@ -134,7 +134,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-logger/pom.xml b/bus-logger/pom.xml index 22391588a1..035ce450a5 100644 --- a/bus-logger/pom.xml +++ b/bus-logger/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-logger - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -44,10 +44,10 @@ 17 1.7.36 1.2.11 - 2.17.2 + 2.18.0 1.2 2.4.1 - 3.4.3.Final + 3.5.0.Final @@ -65,7 +65,7 @@ org.jboss.logging jboss-logging - ${jboss.logging.version} + ${jboss.version} true @@ -114,7 +114,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-mapper/pom.xml b/bus-mapper/pom.xml index c1ce07623c..f93da7ab1a 100755 --- a/bus-mapper/pom.xml +++ b/bus-mapper/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-mapper - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -94,7 +94,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-notify/README.md b/bus-notify/README.md index a2870eab6d..4bf3aed809 100755 --- a/bus-notify/README.md +++ b/bus-notify/README.md @@ -11,7 +11,7 @@ org.aoju bus-notify - 6.5.5 + 6.5.6 ``` diff --git a/bus-notify/pom.xml b/bus-notify/pom.xml index d443ce0994..2ea1e5a97b 100755 --- a/bus-notify/pom.xml +++ b/bus-notify/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-notify - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -43,7 +43,7 @@ UTF-8 17 1.18.24 - 1.6.2 + 2.0.1 1.2.83 @@ -71,7 +71,7 @@ com.sun.mail - javax.mail + jakarta.mail ${mail.version} true @@ -97,7 +97,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-notify/src/main/java/org/aoju/bus/notify/provider/generic/GenericEmailProvider.java b/bus-notify/src/main/java/org/aoju/bus/notify/provider/generic/GenericEmailProvider.java index 92191dcb38..db72d3c6a5 100644 --- a/bus-notify/src/main/java/org/aoju/bus/notify/provider/generic/GenericEmailProvider.java +++ b/bus-notify/src/main/java/org/aoju/bus/notify/provider/generic/GenericEmailProvider.java @@ -25,6 +25,11 @@ ********************************************************************************/ package org.aoju.bus.notify.provider.generic; +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; +import jakarta.mail.*; +import jakarta.mail.internet.*; import org.aoju.bus.core.exception.InstrumentException; import org.aoju.bus.core.lang.Symbol; import org.aoju.bus.core.toolkit.ArrayKit; @@ -36,11 +41,6 @@ import org.aoju.bus.notify.magic.Property; import org.aoju.bus.notify.provider.AbstractProvider; -import javax.activation.DataHandler; -import javax.activation.DataSource; -import javax.activation.FileDataSource; -import javax.mail.*; -import javax.mail.internet.*; import java.io.File; import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; diff --git a/bus-oauth/README.md b/bus-oauth/README.md index 730c7a006b..5240269bfb 100755 --- a/bus-oauth/README.md +++ b/bus-oauth/README.md @@ -15,8 +15,8 @@ org.aoju - bus-oauth - 6.5.5 + bus-oauth + 6.5.6 ``` diff --git a/bus-oauth/pom.xml b/bus-oauth/pom.xml index aa1c5f78ec..cc658d9822 100755 --- a/bus-oauth/pom.xml +++ b/bus-oauth/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-oauth - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,7 +42,7 @@ UTF-8 UTF-8 17 - 4.31.24.ALL + 4.33.1.ALL 1.18.24 1.2.83 @@ -73,7 +73,7 @@ com.alipay.sdk alipay-sdk-java - ${alipay.sdk.version} + ${alipay.version} true @@ -92,7 +92,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-office/pom.xml b/bus-office/pom.xml index 203cd2a330..130da4c4bf 100755 --- a/bus-office/pom.xml +++ b/bus-office/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-office - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -121,7 +121,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-opencv/pom.xml b/bus-opencv/pom.xml index 52edcf311a..78fcc43502 100755 --- a/bus-opencv/pom.xml +++ b/bus-opencv/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-opencv - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -58,7 +58,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 -Xdoclint:none -Xdoclint:none diff --git a/bus-pager/README.md b/bus-pager/README.md index 6115599640..105840ecbb 100755 --- a/bus-pager/README.md +++ b/bus-pager/README.md @@ -42,7 +42,7 @@ org.aoju bus-pager - 6.5.5 + 6.5.6 ``` diff --git a/bus-pager/pom.xml b/bus-pager/pom.xml index 3000d1189e..e1165bc712 100755 --- a/bus-pager/pom.xml +++ b/bus-pager/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-pager - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -44,11 +44,9 @@ 17 3.5.10 31.1-jre - 4.2 + 4.5 + 5.0.1 1.2.8 - 2.3.13 - 0.9.5.5 - 2.9.0 @@ -75,28 +73,16 @@ ${jsqlparser.version} true - - com.alibaba - druid - ${druid.version} - true - com.zaxxer - HikariCP-java6 + HikariCP ${hikari.version} true - com.mchange - c3p0 - ${c3p0.version} - true - - - org.apache.commons - commons-dbcp2 - ${dbcp2.version} + com.alibaba + druid + ${druid.version} true @@ -115,7 +101,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/C3P0.java b/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/C3P0.java deleted file mode 100644 index 5004cb58e2..0000000000 --- a/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/C3P0.java +++ /dev/null @@ -1,44 +0,0 @@ -/********************************************************************************* - * * - * The MIT License (MIT) * - * * - * Copyright (c) 2015-2022 aoju.org mybatis.io and other contributors. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy * - * of this software and associated documentation files (the "Software"), to deal * - * in the Software without restriction, including without limitation the rights * - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included in * - * all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * - * THE SOFTWARE. * - * * - ********************************************************************************/ -package org.aoju.bus.pager.dialect.auto; - -import com.mchange.v2.c3p0.ComboPooledDataSource; -import org.aoju.bus.pager.dialect.AbstractAutoDialect; - -/** - * c3p0 - * - * @author Kimi Liu - * @since Java 17+ - */ -public class C3P0 extends AbstractAutoDialect { - - @Override - public String getJdbcUrl(ComboPooledDataSource comboPooledDataSource) { - return comboPooledDataSource.getJdbcUrl(); - } - -} diff --git a/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/Dbcp.java b/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/Dbcp.java deleted file mode 100644 index 6a38cb8f7f..0000000000 --- a/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/Dbcp.java +++ /dev/null @@ -1,44 +0,0 @@ -/********************************************************************************* - * * - * The MIT License (MIT) * - * * - * Copyright (c) 2015-2022 aoju.org mybatis.io and other contributors. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy * - * of this software and associated documentation files (the "Software"), to deal * - * in the Software without restriction, including without limitation the rights * - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included in * - * all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * - * THE SOFTWARE. * - * * - ********************************************************************************/ -package org.aoju.bus.pager.dialect.auto; - -import org.aoju.bus.pager.dialect.AbstractAutoDialect; -import org.apache.commons.dbcp2.BasicDataSource; - -/** - * commons-dbcp - * - * @author Kimi Liu - * @since Java 17+ - */ -public class Dbcp extends AbstractAutoDialect { - - @Override - public String getJdbcUrl(BasicDataSource basicDataSource) { - return basicDataSource.getUrl(); - } - -} diff --git a/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/Defalut.java b/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/Defalut.java index bfeff34efa..c8035d6a53 100644 --- a/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/Defalut.java +++ b/bus-pager/src/main/java/org/aoju/bus/pager/dialect/auto/Defalut.java @@ -54,21 +54,6 @@ public class Defalut implements AutoDialect { } catch (Exception ignore) { // ignore } - try { - AUTO_DIALECTS.add(new Druid()); - } catch (Exception ignore) { - // ignore - } - try { - AUTO_DIALECTS.add(new C3P0()); - } catch (Exception ignore) { - // ignore - } - try { - AUTO_DIALECTS.add(new Dbcp()); - } catch (Exception ignore) { - // ignore - } } private final Map urlMap = new ConcurrentHashMap<>(); diff --git a/bus-pager/src/main/java/org/aoju/bus/pager/proxy/PageAutoDialect.java b/bus-pager/src/main/java/org/aoju/bus/pager/proxy/PageAutoDialect.java index 7ab1de8061..f69024fe9e 100644 --- a/bus-pager/src/main/java/org/aoju/bus/pager/proxy/PageAutoDialect.java +++ b/bus-pager/src/main/java/org/aoju/bus/pager/proxy/PageAutoDialect.java @@ -31,7 +31,10 @@ import org.aoju.bus.pager.AutoDialect; import org.aoju.bus.pager.Dialect; import org.aoju.bus.pager.dialect.AbstractPaging; -import org.aoju.bus.pager.dialect.auto.*; +import org.aoju.bus.pager.dialect.auto.Defalut; +import org.aoju.bus.pager.dialect.auto.Druid; +import org.aoju.bus.pager.dialect.auto.Early; +import org.aoju.bus.pager.dialect.auto.Hikari; import org.aoju.bus.pager.dialect.base.*; import org.apache.ibatis.mapping.MappedStatement; @@ -97,8 +100,6 @@ public class PageAutoDialect { registerAutoDialectAlias("early", Early.class); registerAutoDialectAlias("hikari", Hikari.class); registerAutoDialectAlias("druid", Druid.class); - registerAutoDialectAlias("dbcp", Dbcp.class); - registerAutoDialectAlias("c3p0", C3P0.class); // 不配置时,默认使用 Defalut registerAutoDialectAlias("default", Defalut.class); } diff --git a/bus-pay/pom.xml b/bus-pay/pom.xml index 359e64c188..3374e0d3c0 100644 --- a/bus-pay/pom.xml +++ b/bus-pay/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-pay - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -46,20 +46,16 @@ 1.18.24 1.2.83 4.0.4 - 4.5.4 + 4.5.13 3.5.0 1.70 - 2.7.0 - 4.3.5.B - 4.31.24.ALL + 2.7.2 + 4.3.9.B + 4.33.1.ALL + 2.0.0 - - org.aoju - bus-base - ${project.version} - ${project.groupId} bus-cache @@ -75,11 +71,6 @@ bus-http ${project.version} - - ${project.groupId} - bus-validate - ${project.version} - org.projectlombok lombok @@ -98,6 +89,12 @@ ${bouncycastle.version} true + + org.bouncycastle + bcpkix-jdk15on + ${bouncycastle.version} + true + jakarta.servlet jakarta.servlet-api @@ -117,12 +114,18 @@ com.paypal.sdk checkout-sdk - 1.0.5 + ${paypal.version} com.github.binarywang weixin-java-pay ${binarywang.version} + + + io.github.x-stream + mxparser + + @@ -140,7 +143,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-proxy/pom.xml b/bus-proxy/pom.xml index d9b480403b..25f7371b49 100755 --- a/bus-proxy/pom.xml +++ b/bus-proxy/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-proxy - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,10 +42,10 @@ UTF-8 UTF-8 17 - 3.27.0-GA - 4.0.63 + 3.29.1-GA + 4.0.66 3.3.0 - 1.9.6 + 1.9.9.1 @@ -99,7 +99,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-sensitive/pom.xml b/bus-sensitive/pom.xml index c0b106d01b..57850fc1bb 100755 --- a/bus-sensitive/pom.xml +++ b/bus-sensitive/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-sensitive - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-setting/pom.xml b/bus-setting/pom.xml index 1952846eee..f1cfdda0ed 100755 --- a/bus-setting/pom.xml +++ b/bus-setting/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-setting - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,7 +42,7 @@ UTF-8 UTF-8 17 - 1.29 + 1.30 @@ -73,7 +73,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-shade/pom.xml b/bus-shade/pom.xml index cf50158dba..20967afe86 100755 --- a/bus-shade/pom.xml +++ b/bus-shade/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-shade - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,12 +42,12 @@ UTF-8 UTF-8 17 - 2.7.0 + 2.7.2 1.21 - 2.3.30 + 2.3.31 1.18.24 - 1.2.8 - 8.0.29 + 5.0.1 + 8.0.30 @@ -81,9 +81,9 @@ true - com.alibaba - druid - ${druid.version} + com.zaxxer + HikariCP + ${hikari.version} true @@ -108,7 +108,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-socket/pom.xml b/bus-socket/pom.xml index a6d7130fba..57b31af105 100755 --- a/bus-socket/pom.xml +++ b/bus-socket/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-socket - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-spring/pom.xml b/bus-spring/pom.xml index e69a762c65..f6acfff550 100755 --- a/bus-spring/pom.xml +++ b/bus-spring/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-spring - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,7 +42,7 @@ UTF-8 UTF-8 17 - 2.7.0 + 2.7.2 1.18.24 @@ -81,7 +81,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-starter/pom.xml b/bus-starter/pom.xml index 3996c17377..52f2adc282 100755 --- a/bus-starter/pom.xml +++ b/bus-starter/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-starter - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,19 +42,19 @@ UTF-8 UTF-8 17 - 2.7.0 + 2.7.2 1.18.24 - 1.9.6 + 1.9.9.1 2.2 31.1-jre 4.3.1 - 5.0.1 + 5.1.0 3.5.10 2.0.7 2.0.1.Final 4.2 - 8.0.29 - 3.0.8 + 8.0.30 + 3.0.10 4.0.4 7.17.4 @@ -210,12 +210,12 @@ ${mybatis.spring.version} true - - javax.validation - validation-api - ${validation.version} - true - + com.github.jsqlparser jsqlparser @@ -322,7 +322,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-starter/src/main/java/org/aoju/bus/starter/i18n/I18nConfiguration.java b/bus-starter/src/main/java/org/aoju/bus/starter/i18n/I18nConfiguration.java index 8c17077989..e96da6c18c 100755 --- a/bus-starter/src/main/java/org/aoju/bus/starter/i18n/I18nConfiguration.java +++ b/bus-starter/src/main/java/org/aoju/bus/starter/i18n/I18nConfiguration.java @@ -31,9 +31,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.support.ResourceBundleMessageSource; -import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; - -import javax.validation.Validator; /** * 国际化配置 @@ -47,6 +44,7 @@ public class I18nConfiguration { @Autowired I18nProperties properties; + @Bean private ResourceBundleMessageSource getMessageSource() { ResourceBundleMessageSource bundleMessageSource = new ResourceBundleMessageSource(); bundleMessageSource.setDefaultEncoding(StringKit.toString(this.properties.getDefaultEncoding(), Charset.DEFAULT_UTF_8)); @@ -54,16 +52,4 @@ private ResourceBundleMessageSource getMessageSource() { return bundleMessageSource; } - /** - * 注入 Validator 验证 Bean - * - * @return 校验信息 - */ - @Bean - public Validator getValidator() { - LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean(); - validator.setValidationMessageSource(getMessageSource()); - return validator; - } - } diff --git a/bus-storage/pom.xml b/bus-storage/pom.xml index a45137781a..ecbdbf680a 100755 --- a/bus-storage/pom.xml +++ b/bus-storage/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-storage - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -159,7 +159,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-tracer/pom.xml b/bus-tracer/pom.xml index e0b830ab58..f4901db421 100755 --- a/bus-tracer/pom.xml +++ b/bus-tracer/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-tracer - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -42,9 +42,9 @@ UTF-8 UTF-8 17 - 2.7.0 + 2.7.2 1.18.24 - 3.0.8 + 3.0.10 4.0.4 2.7.18 4.5.13 @@ -163,7 +163,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/bus-validate/pom.xml b/bus-validate/pom.xml index cf64a20302..576ef25c08 100755 --- a/bus-validate/pom.xml +++ b/bus-validate/pom.xml @@ -6,7 +6,7 @@ org.aoju bus-validate - 6.5.5 + 6.5.6 jar ${project.artifactId} @@ -73,7 +73,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs