From 2a90c4b7b5a47f15a0a94a57fdbfd7a1980bc0d3 Mon Sep 17 00:00:00 2001 From: choweli <1030848819@qq.com> Date: Fri, 18 Apr 2025 17:22:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20modul-info.java=20?= =?UTF-8?q?=E6=9A=82=E6=9C=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hutool-ai/pom.xml | 42 +++++++++ hutool-ai/src/main/java/module-info.java | 34 +++++++ .../test/java/cn/hutool/v7/ai/AIUtilTest.java | 2 +- hutool-all/src/main/java/module-info.java | 23 +++++ hutool-core/src/main/java/module-info.java | 93 +++++++++++++++++++ hutool-cron/pom.xml | 58 ++++++++++++ hutool-cron/src/main/java/module-info.java | 26 ++++++ hutool-crypto/src/main/java/module-info.java | 32 +++++++ hutool-db/pom.xml | 57 ++++++++++++ .../main/java/cn/hutool/v7/db/pojo/Test.java | 8 ++ hutool-db/src/main/java/module-info.java | 53 +++++++++++ hutool-extra/pom.xml | 11 +++ hutool-extra/src/main/java/module-info.java | 54 +++++++++++ hutool-http/pom.xml | 8 +- hutool-http/src/main/java/module-info.java | 41 ++++++++ hutool-jmh/src/test/java/module-info.java | 23 +++++ .../java/cn/hutool/v7/json/issues/Test.java | 8 ++ .../v7/json/issues/issueIVMD5/Test.java | 8 ++ .../cn/hutool/v7/json/test/bean/Test.java | 8 ++ .../hutool/v7/json/test/bean/report/Test.java | 8 ++ hutool-json/src/main/java/module-info.java | 48 ++++++++++ .../engine/commons/ApacheCommonsLog4JLog.java | 13 ++- .../hutool/v7/log/engine/log4j/Log4jLog.java | 17 ++-- .../hutool/v7/log/engine/tinylog/TinyLog.java | 28 ++++-- .../v7/log/engine/tinylog/TinyLogEngine.java | 2 +- hutool-log/src/main/java/module-info.java | 37 ++++++++ hutool-poi/pom.xml | 15 +++ hutool-poi/src/main/java/module-info.java | 36 +++++++ hutool-setting/pom.xml | 50 ++++++++++ hutool-setting/src/main/java/module-info.java | 31 +++++++ hutool-socket/pom.xml | 50 ++++++++++ hutool-socket/src/main/java/module-info.java | 24 +++++ hutool-swing/src/main/java/module-info.java | 28 ++++++ 33 files changed, 948 insertions(+), 28 deletions(-) create mode 100644 hutool-ai/src/main/java/module-info.java create mode 100644 hutool-all/src/main/java/module-info.java create mode 100644 hutool-core/src/main/java/module-info.java create mode 100644 hutool-cron/src/main/java/module-info.java create mode 100644 hutool-crypto/src/main/java/module-info.java create mode 100644 hutool-db/src/main/java/cn/hutool/v7/db/pojo/Test.java create mode 100644 hutool-db/src/main/java/module-info.java create mode 100644 hutool-extra/src/main/java/module-info.java create mode 100644 hutool-http/src/main/java/module-info.java create mode 100644 hutool-jmh/src/test/java/module-info.java create mode 100644 hutool-json/src/main/java/cn/hutool/v7/json/issues/Test.java create mode 100644 hutool-json/src/main/java/cn/hutool/v7/json/issues/issueIVMD5/Test.java create mode 100644 hutool-json/src/main/java/cn/hutool/v7/json/test/bean/Test.java create mode 100644 hutool-json/src/main/java/cn/hutool/v7/json/test/bean/report/Test.java create mode 100644 hutool-json/src/main/java/module-info.java create mode 100644 hutool-log/src/main/java/module-info.java create mode 100644 hutool-poi/src/main/java/module-info.java create mode 100644 hutool-setting/src/main/java/module-info.java create mode 100644 hutool-socket/src/main/java/module-info.java create mode 100644 hutool-swing/src/main/java/module-info.java diff --git a/hutool-ai/pom.xml b/hutool-ai/pom.xml index e7f6dfbf3..e5a098704 100644 --- a/hutool-ai/pom.xml +++ b/hutool-ai/pom.xml @@ -18,6 +18,11 @@ cn.hutool.v7.ai + 1.15.2 + 2.18.1 + 2.0.53 + 2.13.0 + @@ -43,12 +48,49 @@ ${project.parent.version} compile + + cn.hutool.v7 + hutool-crypto + ${project.parent.version} + true + cn.hutool.v7 hutool-swing ${project.parent.version} test + + com.squareup.moshi + moshi + ${moshi.version} + true + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + true + + + com.alibaba.fastjson2 + fastjson2 + ${fastjson2.version} + true + + + com.google.code.gson + gson + ${gson.version} + true + + + org.bouncycastle + bcpkix-jdk18on + ${bouncycastle.version} + compile + true + diff --git a/hutool-ai/src/main/java/module-info.java b/hutool-ai/src/main/java/module-info.java new file mode 100644 index 000000000..c87580ebb --- /dev/null +++ b/hutool-ai/src/main/java/module-info.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.ai { + exports cn.hutool.v7.ai; + exports cn.hutool.v7.ai.core; + exports cn.hutool.v7.ai.model.deepseek; + exports cn.hutool.v7.ai.model.doubao; + exports cn.hutool.v7.ai.model.grok; + exports cn.hutool.v7.ai.model.openai; + + requires hutool.json; + requires hutool.core; + requires hutool.crypto; + requires hutool.http; + +} diff --git a/hutool-ai/src/test/java/cn/hutool/v7/ai/AIUtilTest.java b/hutool-ai/src/test/java/cn/hutool/v7/ai/AIUtilTest.java index 0f5087fa0..3ecfd5134 100644 --- a/hutool-ai/src/test/java/cn/hutool/v7/ai/AIUtilTest.java +++ b/hutool-ai/src/test/java/cn/hutool/v7/ai/AIUtilTest.java @@ -82,6 +82,6 @@ class AIUtilTest { messages.add(new Message("system","你是财神爷,只会说“我是财神”")); messages.add(new Message("user","你是谁啊?")); final String chat = AIUtil.chat(new AIConfigBuilder(ModelName.DEEPSEEK.getValue()).setApiKey(key).build(), messages); - System.out.println(chat); + assertNotNull(chat); } } diff --git a/hutool-all/src/main/java/module-info.java b/hutool-all/src/main/java/module-info.java new file mode 100644 index 000000000..c88d4dfb0 --- /dev/null +++ b/hutool-all/src/main/java/module-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.all { + +} diff --git a/hutool-core/src/main/java/module-info.java b/hutool-core/src/main/java/module-info.java new file mode 100644 index 000000000..95ac202ff --- /dev/null +++ b/hutool-core/src/main/java/module-info.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.core { + exports cn.hutool.v7.core.exception; + exports cn.hutool.v7.core.lang; + exports cn.hutool.v7.core.lang.wrapper; + exports cn.hutool.v7.core.text; + exports cn.hutool.v7.core.io; + exports cn.hutool.v7.core.io.file; + exports cn.hutool.v7.core.io.stream; + exports cn.hutool.v7.core.io.resource; + exports cn.hutool.v7.core.util; + exports cn.hutool.v7.core.array; + exports cn.hutool.v7.core.codec.binary; + exports cn.hutool.v7.core.thread; + exports cn.hutool.v7.core.thread.lock; + exports cn.hutool.v7.core.map; + exports cn.hutool.v7.core.collection; + exports cn.hutool.v7.core.spi; + exports cn.hutool.v7.core.func; + exports cn.hutool.v7.core.lang.caller; + exports cn.hutool.v7.core.reflect; + exports cn.hutool.v7.core.lang.ansi; + exports cn.hutool.v7.core.date; + exports cn.hutool.v7.core.lang.getter; + exports cn.hutool.v7.core.text.split; + exports cn.hutool.v7.core.bean.copier; + exports cn.hutool.v7.core.bean.path; + exports cn.hutool.v7.core.bean; + exports cn.hutool.v7.core.net.url; + exports cn.hutool.v7.core.io.watch; + exports cn.hutool.v7.core.io.watch.watchers; + exports cn.hutool.v7.core.convert; + exports cn.hutool.v7.core.regex; + exports cn.hutool.v7.core.map.concurrent; + exports cn.hutool.v7.core.math; + exports cn.hutool.v7.core.collection.set; + exports cn.hutool.v7.core.collection.iter; + exports cn.hutool.v7.core.reflect.method; + exports cn.hutool.v7.core.lang.builder; + exports cn.hutool.v7.core.lang.range; + exports cn.hutool.v7.core.lang.page; + exports cn.hutool.v7.core.classloader; + exports cn.hutool.v7.core.pool; + exports cn.hutool.v7.core.pool.partition; + exports cn.hutool.v7.core.stream; + exports cn.hutool.v7.core.lang.tuple; + exports cn.hutool.v7.core.codec; + exports cn.hutool.v7.core.net; + exports cn.hutool.v7.core.map.reference; + exports cn.hutool.v7.core.lang.mutable; + exports cn.hutool.v7.core.lang.loader; + exports cn.hutool.v7.core.comparator; + exports cn.hutool.v7.core.date.format; + exports cn.hutool.v7.core.lang.copier; + exports cn.hutool.v7.core.convert.impl; + exports cn.hutool.v7.core.bean.path.node; + exports cn.hutool.v7.core.xml; + exports cn.hutool.v7.core.reflect.kotlin; + exports cn.hutool.v7.core.text.escape; + exports cn.hutool.v7.core.annotation; + exports cn.hutool.v7.core.map.multi; + exports cn.hutool.v7.core.data.id; + exports cn.hutool.v7.core.io.buffer; + exports cn.hutool.v7.core.reflect.creator; + exports cn.hutool.v7.core.compress; + exports cn.hutool.v7.core.net.ssl; + + requires java.desktop; + requires java.sql; + requires java.management; + requires java.compiler; + requires java.naming; + +} diff --git a/hutool-cron/pom.xml b/hutool-cron/pom.xml index 55589a328..bef11fd35 100755 --- a/hutool-cron/pom.xml +++ b/hutool-cron/pom.xml @@ -34,6 +34,15 @@ cn.hutool.v7.cron + 2.3 + + 3.4.3.Final + 2.0.9 + 1.2.17 + 2.20.0 + 1.3.6 + 2.7.0 + 1.3.4 @@ -53,5 +62,54 @@ 2.4.0 test + + + org.yaml + snakeyaml + ${snakeyaml.version} + true + + + org.jboss.logging + jboss-logging + ${jboss-logging.version} + + + + org.slf4j + slf4j-simple + ${slf4j.version} + test + + + log4j + log4j + ${log4j.version} + true + + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + true + + + org.tinylog + tinylog + ${tinylog.version} + true + + + org.tinylog + tinylog-api + ${tinylog2.version} + true + + + commons-logging + commons-logging + ${commons-logging.version} + true + diff --git a/hutool-cron/src/main/java/module-info.java b/hutool-cron/src/main/java/module-info.java new file mode 100644 index 000000000..17fffc929 --- /dev/null +++ b/hutool-cron/src/main/java/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.cron { + requires hutool.setting; + requires hutool.log; + requires hutool.core; + +} diff --git a/hutool-crypto/src/main/java/module-info.java b/hutool-crypto/src/main/java/module-info.java new file mode 100644 index 000000000..1a3a69fa7 --- /dev/null +++ b/hutool-crypto/src/main/java/module-info.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.crypto { + exports cn.hutool.v7.crypto; + exports cn.hutool.v7.crypto.provider; + exports cn.hutool.v7.crypto.digest.mac; + exports cn.hutool.v7.crypto.asymmetric; + + requires hutool.core; + requires org.bouncycastle.provider; + requires java.security.sasl; + requires org.bouncycastle.pkix; + +} diff --git a/hutool-db/pom.xml b/hutool-db/pom.xml index 438d3e18c..6bdbd00ec 100755 --- a/hutool-db/pom.xml +++ b/hutool-db/pom.xml @@ -42,6 +42,15 @@ 6.3.0 3.46.0.0 2.7.4 + + 2.3 + 3.4.3.Final + 2.0.9 + 1.2.17 + 2.20.0 + 1.3.6 + 2.7.0 + 1.3.4 @@ -167,5 +176,53 @@ 2.24.7 test + + org.yaml + snakeyaml + ${snakeyaml.version} + true + + + org.jboss.logging + jboss-logging + ${jboss-logging.version} + + + + org.slf4j + slf4j-simple + ${slf4j.version} + test + + + log4j + log4j + ${log4j.version} + true + + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + true + + + org.tinylog + tinylog + ${tinylog.version} + true + + + org.tinylog + tinylog-api + ${tinylog2.version} + true + + + commons-logging + commons-logging + ${commons-logging.version} + true + diff --git a/hutool-db/src/main/java/cn/hutool/v7/db/pojo/Test.java b/hutool-db/src/main/java/cn/hutool/v7/db/pojo/Test.java new file mode 100644 index 000000000..ccbd40ba9 --- /dev/null +++ b/hutool-db/src/main/java/cn/hutool/v7/db/pojo/Test.java @@ -0,0 +1,8 @@ +package cn.hutool.v7.db.pojo; + +/** + * 为了通过test进行占位 + * @author choweli + */ +public class Test { +} diff --git a/hutool-db/src/main/java/module-info.java b/hutool-db/src/main/java/module-info.java new file mode 100644 index 000000000..fc64b2f63 --- /dev/null +++ b/hutool-db/src/main/java/module-info.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.db { + + exports cn.hutool.v7.db; + exports cn.hutool.v7.db.config; + exports cn.hutool.v7.db.ds; + exports cn.hutool.v7.db.ds.bee; + exports cn.hutool.v7.db.ds.c3p0; + exports cn.hutool.v7.db.ds.dbcp; + exports cn.hutool.v7.db.ds.druid; + exports cn.hutool.v7.db.ds.hikari; + exports cn.hutool.v7.db.ds.jndi; + exports cn.hutool.v7.db.ds.pooled; + exports cn.hutool.v7.db.ds.simple; + exports cn.hutool.v7.db.ds.tomcat; + + requires hutool.setting; + requires hutool.log; + requires hutool.core; + requires beecp; + requires com.mchange.v2.c3p0; + requires java.desktop; + requires org.apache.commons.dbcp2; + requires druid; + requires com.zaxxer.hikari; + requires java.sql; + requires java.naming; + requires tomcat.jdbc; + + opens cn.hutool.v7.db; + opens cn.hutool.v7.db.config; + opens cn.hutool.v7.db.pojo; + +} diff --git a/hutool-extra/pom.xml b/hutool-extra/pom.xml index 5105b6304..e8e893d15 100755 --- a/hutool-extra/pom.xml +++ b/hutool-extra/pom.xml @@ -268,6 +268,17 @@ org.apache.sshd sshd-core ${sshd.version} + + + org.apache.sshd + sshd-common + + + + + org.apache.sshd + sshd-common + ${sshd.version} diff --git a/hutool-extra/src/main/java/module-info.java b/hutool-extra/src/main/java/module-info.java new file mode 100644 index 000000000..8684c5129 --- /dev/null +++ b/hutool-extra/src/main/java/module-info.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.extra { + requires spring.core; + requires org.apache.commons.compress; + requires emoji.java; + requires org.apache.commons.net; + requires ftpserver.core; + requires ftplet.api; + requires hutool.setting; + requires hutool.log; + requires hutool.core; + requires jakarta.mail; + requires java.management; + requires com.github.oshi; + requires kafka.clients; + requires com.rabbitmq.client; + requires rocketmq.client; + requires rocketmq.common; + requires bopomofo4j; + requires pinyin; + requires jpinyin; + requires pinyin4j; + requires TinyPinyin; + requires spring.context; + requires spring.beans; + requires ganymed.ssh2; + requires com.jcraft.jsch; + requires static org.apache.sshd.core; + requires static org.apache.sshd.common; + requires mmseg4j.core; + requires lucene.core; + requires lucene.analyzers.smartcn; + + +} diff --git a/hutool-http/pom.xml b/hutool-http/pom.xml index f9d7babd6..1875473d8 100755 --- a/hutool-http/pom.xml +++ b/hutool-http/pom.xml @@ -36,7 +36,7 @@ cn.hutool.v7.http 5.4.3 4.5.14 - 4.12.0 + 5.0.0-alpha.14 2.3.18.Final 12.0.19 11.0.6 @@ -123,6 +123,12 @@ tomcat-embed-core ${tomcat.version} provided + + + jakarta.servlet + jakarta.servlet-api + + org.smartboot.http diff --git a/hutool-http/src/main/java/module-info.java b/hutool-http/src/main/java/module-info.java new file mode 100644 index 000000000..e9baeb2b8 --- /dev/null +++ b/hutool-http/src/main/java/module-info.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.http { + requires jdk.httpserver; + requires hutool.log; + requires org.apache.httpcomponents.httpclient; + requires org.apache.httpcomponents.httpcore; + requires hutool.core; + requires org.apache.httpcomponents.core5.httpcore5; + requires org.apache.httpcomponents.client5.httpclient5; + requires okhttp3; + requires org.eclipse.jetty.server; + requires smart.http.server; + requires undertow.core; + requires jakarta.xml.soap; + requires okio; + requires smart.http.common; + requires org.apache.tomcat.embed.core; + + requires aio.pro; +// requires aio.core; + +} diff --git a/hutool-jmh/src/test/java/module-info.java b/hutool-jmh/src/test/java/module-info.java new file mode 100644 index 000000000..7dd9e9b7f --- /dev/null +++ b/hutool-jmh/src/test/java/module-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.jmh { + +} diff --git a/hutool-json/src/main/java/cn/hutool/v7/json/issues/Test.java b/hutool-json/src/main/java/cn/hutool/v7/json/issues/Test.java new file mode 100644 index 000000000..df336f2e5 --- /dev/null +++ b/hutool-json/src/main/java/cn/hutool/v7/json/issues/Test.java @@ -0,0 +1,8 @@ +package cn.hutool.v7.json.issues; + +/** + * 为了通过test进行占位 + * @author choweli + */ +public class Test { +} diff --git a/hutool-json/src/main/java/cn/hutool/v7/json/issues/issueIVMD5/Test.java b/hutool-json/src/main/java/cn/hutool/v7/json/issues/issueIVMD5/Test.java new file mode 100644 index 000000000..f83146c6b --- /dev/null +++ b/hutool-json/src/main/java/cn/hutool/v7/json/issues/issueIVMD5/Test.java @@ -0,0 +1,8 @@ +package cn.hutool.v7.json.issues.issueIVMD5; + +/** + * 为了通过test进行占位 + * @author choweli + */ +public class Test { +} diff --git a/hutool-json/src/main/java/cn/hutool/v7/json/test/bean/Test.java b/hutool-json/src/main/java/cn/hutool/v7/json/test/bean/Test.java new file mode 100644 index 000000000..4f56d5d53 --- /dev/null +++ b/hutool-json/src/main/java/cn/hutool/v7/json/test/bean/Test.java @@ -0,0 +1,8 @@ +package cn.hutool.v7.json.test.bean; + +/** + * 为了通过test进行占位 + * @author choweli + */ +public class Test { +} diff --git a/hutool-json/src/main/java/cn/hutool/v7/json/test/bean/report/Test.java b/hutool-json/src/main/java/cn/hutool/v7/json/test/bean/report/Test.java new file mode 100644 index 000000000..372698d9f --- /dev/null +++ b/hutool-json/src/main/java/cn/hutool/v7/json/test/bean/report/Test.java @@ -0,0 +1,8 @@ +package cn.hutool.v7.json.test.bean.report; + +/** + * 为了通过test进行占位 + * @author choweli + */ +public class Test { +} diff --git a/hutool-json/src/main/java/module-info.java b/hutool-json/src/main/java/module-info.java new file mode 100644 index 000000000..2364d0855 --- /dev/null +++ b/hutool-json/src/main/java/module-info.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.json { + exports cn.hutool.v7.json; + exports cn.hutool.v7.json.jwt; + exports cn.hutool.v7.json.writer; + exports cn.hutool.v7.json.engine; + exports cn.hutool.v7.json.engine.gson; + exports cn.hutool.v7.json.engine.moshi; + exports cn.hutool.v7.json.engine.jackson; + exports cn.hutool.v7.json.engine.fastjson; + exports cn.hutool.v7.json.test.bean; + exports cn.hutool.v7.json.test.bean.report; + + requires hutool.core; + requires hutool.crypto; + requires com.alibaba.fastjson2; + requires com.google.gson; + requires com.fasterxml.jackson.databind; + requires com.squareup.moshi; + requires okio; + requires java.sql; + + opens cn.hutool.v7.json; + opens cn.hutool.v7.json.jwt; + opens cn.hutool.v7.json.engine; + opens cn.hutool.v7.json.issues; + opens cn.hutool.v7.json.issues.issueIVMD5; + +} diff --git a/hutool-log/src/main/java/cn/hutool/v7/log/engine/commons/ApacheCommonsLog4JLog.java b/hutool-log/src/main/java/cn/hutool/v7/log/engine/commons/ApacheCommonsLog4JLog.java index a1b43a3e6..69c6efe21 100644 --- a/hutool-log/src/main/java/cn/hutool/v7/log/engine/commons/ApacheCommonsLog4JLog.java +++ b/hutool-log/src/main/java/cn/hutool/v7/log/engine/commons/ApacheCommonsLog4JLog.java @@ -16,10 +16,9 @@ package cn.hutool.v7.log.engine.commons; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.impl.Log4JLogger; - import cn.hutool.v7.log.engine.log4j.Log4jLog; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; /** * Apache Commons Logging for Log4j @@ -36,8 +35,8 @@ public class ApacheCommonsLog4JLog extends Log4jLog { * * @param logger Logger */ - public ApacheCommonsLog4JLog(final Log logger) { - super(((Log4JLogger) logger).getLogger()); + public ApacheCommonsLog4JLog(final Logger logger) { + super(logger); } /** @@ -46,7 +45,7 @@ public class ApacheCommonsLog4JLog extends Log4jLog { * @param clazz 类 */ public ApacheCommonsLog4JLog(final Class clazz) { - super(clazz); + super(LogManager.getLogger(clazz)); } /** @@ -55,6 +54,6 @@ public class ApacheCommonsLog4JLog extends Log4jLog { * @param name 名称 */ public ApacheCommonsLog4JLog(final String name) { - super(name); + super(LogManager.getLogger(name)); } } diff --git a/hutool-log/src/main/java/cn/hutool/v7/log/engine/log4j/Log4jLog.java b/hutool-log/src/main/java/cn/hutool/v7/log/engine/log4j/Log4jLog.java index e813cae3c..36ac32dde 100644 --- a/hutool-log/src/main/java/cn/hutool/v7/log/engine/log4j/Log4jLog.java +++ b/hutool-log/src/main/java/cn/hutool/v7/log/engine/log4j/Log4jLog.java @@ -16,11 +16,11 @@ package cn.hutool.v7.log.engine.log4j; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; - import cn.hutool.v7.core.text.StrUtil; import cn.hutool.v7.log.AbstractLog; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; /** * Apache Log4J log.
@@ -49,7 +49,7 @@ public class Log4jLog extends AbstractLog { * @param name 日志标识 */ public Log4jLog(final String name) { - this(Logger.getLogger(name)); + this(LogManager.getLogger(name)); } /** @@ -101,7 +101,7 @@ public class Log4jLog extends AbstractLog { // ------------------------------------------------------------------------- Warn @Override public boolean isWarnEnabled() { - return logger.isEnabledFor(Level.WARN); + return logger.isEnabled(Level.WARN); } @Override @@ -112,7 +112,7 @@ public class Log4jLog extends AbstractLog { // ------------------------------------------------------------------------- Error @Override public boolean isErrorEnabled() { - return logger.isEnabledFor(Level.ERROR); + return logger.isEnabled(Level.ERROR); } @Override @@ -144,8 +144,9 @@ public class Log4jLog extends AbstractLog { throw new Error(StrUtil.format("Can not identify level: {}", level)); } - if(logger.isEnabledFor(log4jLevel)) { - logger.log(fqcn, log4jLevel, StrUtil.format(format, arguments), t); + if(logger.isEnabled(log4jLevel)) { + //Log4j2的API设计已内置类名自动获取能力 + logger.log(log4jLevel, StrUtil.format(format, arguments), t); } } } diff --git a/hutool-log/src/main/java/cn/hutool/v7/log/engine/tinylog/TinyLog.java b/hutool-log/src/main/java/cn/hutool/v7/log/engine/tinylog/TinyLog.java index 10c11b7c9..696f6b378 100644 --- a/hutool-log/src/main/java/cn/hutool/v7/log/engine/tinylog/TinyLog.java +++ b/hutool-log/src/main/java/cn/hutool/v7/log/engine/tinylog/TinyLog.java @@ -16,13 +16,15 @@ package cn.hutool.v7.log.engine.tinylog; -import cn.hutool.v7.log.AbstractLog; -import org.pmw.tinylog.Level; -import org.pmw.tinylog.LogEntryForwarder; -import org.pmw.tinylog.Logger; - import cn.hutool.v7.core.array.ArrayUtil; import cn.hutool.v7.core.text.StrUtil; +import cn.hutool.v7.log.AbstractLog; +import org.tinylog.Level; +import org.tinylog.configuration.Configuration; +import org.tinylog.format.AdvancedMessageFormatter; +import org.tinylog.format.MessageFormatter; +import org.tinylog.provider.LoggingProvider; +import org.tinylog.provider.ProviderRegistry; /** * tinylog log.
@@ -39,6 +41,12 @@ public class TinyLog extends AbstractLog { private final int level; private final String name; + private static final LoggingProvider provider = ProviderRegistry.getLoggingProvider(); + + private static final MessageFormatter formatter = new AdvancedMessageFormatter( + Configuration.getLocale(), + Configuration.isEscapingEnabled() + ); /** * 构造 @@ -57,7 +65,7 @@ public class TinyLog extends AbstractLog { */ public TinyLog(final String name) { this.name = name; - this.level = Logger.getLevel(name).ordinal(); + this.level = provider.getMinimumLevel().ordinal(); } @Override @@ -101,12 +109,12 @@ public class TinyLog extends AbstractLog { // ------------------------------------------------------------------------- Warn @Override public boolean isWarnEnabled() { - return this.level <= org.pmw.tinylog.Level.WARNING.ordinal(); + return this.level <= Level.WARN.ordinal(); } @Override public void warn(final String fqcn, final Throwable t, final String format, final Object... arguments) { - logIfEnabled(fqcn, Level.WARNING, t, format, arguments); + logIfEnabled(fqcn, Level.WARN, t, format, arguments); } // ------------------------------------------------------------------------- Error @@ -145,7 +153,7 @@ public class TinyLog extends AbstractLog { if (null == t) { t = getLastArgumentIfThrowable(arguments); } - LogEntryForwarder.forward(DEPTH, level, t, StrUtil.toString(format), arguments); + provider.log(DEPTH, null, level, t, formatter, StrUtil.toString(format), arguments); } /** @@ -168,7 +176,7 @@ public class TinyLog extends AbstractLog { tinyLevel = Level.INFO; break; case WARN: - tinyLevel = Level.WARNING; + tinyLevel = Level.WARN; break; case ERROR: tinyLevel = Level.ERROR; diff --git a/hutool-log/src/main/java/cn/hutool/v7/log/engine/tinylog/TinyLogEngine.java b/hutool-log/src/main/java/cn/hutool/v7/log/engine/tinylog/TinyLogEngine.java index 00048fc64..5006bb30d 100644 --- a/hutool-log/src/main/java/cn/hutool/v7/log/engine/tinylog/TinyLogEngine.java +++ b/hutool-log/src/main/java/cn/hutool/v7/log/engine/tinylog/TinyLogEngine.java @@ -32,7 +32,7 @@ public class TinyLogEngine extends AbsLogEngine { */ public TinyLogEngine() { super("TinyLog"); - checkLogExist(org.pmw.tinylog.Logger.class); + checkLogExist(org.tinylog.Logger.class); } @Override diff --git a/hutool-log/src/main/java/module-info.java b/hutool-log/src/main/java/module-info.java new file mode 100644 index 000000000..90c863e10 --- /dev/null +++ b/hutool-log/src/main/java/module-info.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.log { + exports cn.hutool.v7.log; + exports cn.hutool.v7.log.level; + exports cn.hutool.v7.log.engine.console; + exports cn.hutool.v7.log.engine.log4j2; + + requires hutool.core; + requires org.jboss.logging; + requires org.apache.commons.logging; + requires org.apache.logging.log4j; + requires org.slf4j; + requires tinylog; + requires org.tinylog.api; + requires java.logging; + requires log4j; + +} diff --git a/hutool-poi/pom.xml b/hutool-poi/pom.xml index 505370400..bc9b7cabd 100755 --- a/hutool-poi/pom.xml +++ b/hutool-poi/pom.xml @@ -37,6 +37,7 @@ 5.4.1 2.20.0 + 0.39.0 @@ -69,6 +70,14 @@ bcprov-jdk15on org.bouncycastle + + org.apache.xmlgraphics + xmlgraphics-commons + + + org.apache.xmlgraphics + batik-transcoder + true
@@ -79,5 +88,11 @@ ${log4j2.version} test + + com.hierynomus + sshj + ${hierynomus.version} + test + diff --git a/hutool-poi/src/main/java/module-info.java b/hutool-poi/src/main/java/module-info.java new file mode 100644 index 000000000..bfdcfd4ec --- /dev/null +++ b/hutool-poi/src/main/java/module-info.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.poi { + exports cn.hutool.v7.poi.excel.reader; + + requires org.apache.poi.ooxml; + requires hutool.core; + requires java.desktop; + requires ofdrw.layout; + requires ofdrw.font; + requires ofdrw.reader; + requires ofdrw.converter; + requires java.sql; + + opens cn.hutool.v7.poi.excel.writer; + opens cn.hutool.v7.poi.csv; + +} diff --git a/hutool-setting/pom.xml b/hutool-setting/pom.xml index ed9b53020..2a508b559 100755 --- a/hutool-setting/pom.xml +++ b/hutool-setting/pom.xml @@ -35,6 +35,14 @@ cn.hutool.v7.setting 2.3 + + 3.4.3.Final + 2.0.9 + 1.2.17 + 2.20.0 + 1.3.6 + 2.7.0 + 1.3.4 @@ -55,5 +63,47 @@ ${snakeyaml.version} true + + org.jboss.logging + jboss-logging + ${jboss-logging.version} + + + + org.slf4j + slf4j-simple + ${slf4j.version} + test + + + log4j + log4j + ${log4j.version} + true + + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + true + + + org.tinylog + tinylog + ${tinylog.version} + true + + + org.tinylog + tinylog-api + ${tinylog2.version} + true + + + commons-logging + commons-logging + ${commons-logging.version} + true + diff --git a/hutool-setting/src/main/java/module-info.java b/hutool-setting/src/main/java/module-info.java new file mode 100644 index 000000000..3e581cc9f --- /dev/null +++ b/hutool-setting/src/main/java/module-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.setting { + exports cn.hutool.v7.setting; + exports cn.hutool.v7.setting.props; + + requires hutool.log; + requires hutool.core; + requires org.yaml.snakeyaml; + + opens cn.hutool.v7.setting.toml; + +} diff --git a/hutool-socket/pom.xml b/hutool-socket/pom.xml index 629cc307e..bba253c17 100755 --- a/hutool-socket/pom.xml +++ b/hutool-socket/pom.xml @@ -34,6 +34,14 @@ cn.hutool.v7.socket + + 3.4.3.Final + 2.0.9 + 1.2.17 + 2.20.0 + 1.3.6 + 2.7.0 + 1.3.4 @@ -47,5 +55,47 @@ hutool-log ${project.parent.version} + + org.jboss.logging + jboss-logging + ${jboss-logging.version} + + + + org.slf4j + slf4j-simple + ${slf4j.version} + test + + + log4j + log4j + ${log4j.version} + true + + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + true + + + org.tinylog + tinylog + ${tinylog.version} + true + + + org.tinylog + tinylog-api + ${tinylog2.version} + true + + + commons-logging + commons-logging + ${commons-logging.version} + true + diff --git a/hutool-socket/src/main/java/module-info.java b/hutool-socket/src/main/java/module-info.java new file mode 100644 index 000000000..301daffc5 --- /dev/null +++ b/hutool-socket/src/main/java/module-info.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.socket { + requires hutool.log; + requires hutool.core; +} diff --git a/hutool-swing/src/main/java/module-info.java b/hutool-swing/src/main/java/module-info.java new file mode 100644 index 000000000..b32fc4c2b --- /dev/null +++ b/hutool-swing/src/main/java/module-info.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2025 Hutool Team and hutool.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + * @author choweli + */ +module hutool.swing { + requires hutool.core; + requires java.desktop; + requires animated.gif.lib; + requires metadata.extractor; + requires com.google.zxing; + +}