This commit is contained in:
Looly
2025-04-17 16:05:06 +08:00
parent 038a6ca0c8
commit d58d5ea032
6 changed files with 30 additions and 49 deletions

View File

@@ -9,8 +9,8 @@
</p>
<p align="center">
<a target="_blank" href="https://search.maven.org/artifact/org.dromara.hutool/hutool-all">
<img alt="" src="https://img.shields.io/maven-central/v/org.dromara.hutool/hutool-all.svg?label=Maven%20Central" />
<a target="_blank" href="https://search.maven.org/artifact/cn.hutool/hutool-all">
<img alt="" src="https://img.shields.io/maven-central/v/cn.hutool/hutool-all.svg?label=Maven%20Central" />
</a>
<a target="_blank" href="https://www.apache.org/licenses/LICENSE-2.0.html">
<img alt="" src="https://img.shields.io/:license-apache2.0-blue.svg?logo=apache" />
@@ -18,14 +18,14 @@
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
<img alt="" src="https://img.shields.io/badge/JDK-8+-green.svg" />
</a>
<a target="_blank" href="https://travis-ci.com/dromara/hutool">
<img alt="" src="https://travis-ci.com/dromara/hutool.svg?branch=v5-master" />
<a target="_blank" href="https://travis-ci.com/chinabugotech/hutool">
<img alt="" src="https://travis-ci.com/chinabugotech/hutool.svg?branch=v5-master" />
</a>
<a href="https://www.codacy.com/gh/dromara/hutool/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=dromara/hutool&amp;utm_campaign=Badge_Grade">
<a href="https://www.codacy.com/gh/chinabugotech/hutool/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=chinabugotech/hutool&amp;utm_campaign=Badge_Grade">
<img alt="" src="https://app.codacy.com/project/badge/Grade/8a6897d9de7440dd9de8804c28d2871d"/>
</a>
<a href="https://codecov.io/gh/dromara/hutool">
<img alt="" src="https://codecov.io/gh/dromara/hutool/branch/v6-master/graph/badge.svg" />
<a href="https://codecov.io/gh/cn/hutool">
<img alt="" src="https://codecov.io/gh/chinabugotech/hutool/branch/v7-master/graph/badge.svg" />
</a>
<a target="_blank" href="https://gitter.im/hutool/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
<img alt="" src="https://badges.gitter.im/hutool/Lobby.svg" />
@@ -34,7 +34,7 @@
<img alt="star" src='https://gitee.com/chinabugotech/hutool/badge/star.svg'/>
</a>
<a target="_blank" href='https://github.com/chinabugotech/hutool'>
<img alt="github star" src="https://img.shields.io/github/stars/dromara/hutool.svg?style=social"/>
<img alt="github star" src="https://img.shields.io/github/stars/chinabugotech/hutool.svg?style=social"/>
</a>
<a target="_blank" href='https://gitcode.com/chinabugotech/hutool'>
<img src="https://gitcode.com/chinabugotech/hutool/star/badge.svg" alt="gitcode star"/>
@@ -79,12 +79,12 @@
Hutool目前主要版本4.x、5.x、6.x、7.x选择如下
| 版本 | jdk | Maven仓库 | 主要特点 |
|-----|--------|--------------------------------------------------------------------------------------------------------|-------------------------------------|
| 4.x | jdk1.7 | [cn.hutool/hutool-all/4.x](https://mvnrepository.com/artifact/cn.hutool/hutool-all/4.6.17) | jdk1.7编译 |
| 5.x | jdk1.8 | [cn.hutool/hutool-all/5.x ](https://mvnrepository.com/artifact/cn.hutool/hutool-all) | jdk1.8编译,使用JavaEE,适配JDK11、17、21 |
| 版本 | jdk | Maven仓库 | 主要特点 |
|-----|--------|-----------------------------------------------------------------------------------------------------|-------------------------------------|
| 4.x | jdk1.7 | [cn.hutool/hutool-all/4.x](https://mvnrepository.com/artifact/cn.hutool/hutool-all/4.6.17) | jdk1.7编译 |
| 5.x | jdk1.8 | [cn.hutool/hutool-all/5.x ](https://mvnrepository.com/artifact/cn.hutool/hutool-all) | jdk1.8编译,使用JavaEE,适配JDK11、17、21 |
| 6.x | jdk1.8 | [org.dromara.hutool/hutool-all/6.x ](https://mvnrepository.com/artifact/org.dromara.hutool/hutool-all) | jdk1.8编译,使用Jakarta EE,适配JDK11、17、21 |
| 7.x | jdk17 | [cn.hutool.v7/hutool-all/6.x ](https://mvnrepository.com/artifact/org.dromara.hutool/hutool-all) | jdk17编译,使用Jakarta EE,适配JDK11、17、21 |
| 7.x | jdk17 | [cn.hutool/hutool-all/6.x ](https://mvnrepository.com/artifact/org.dromara.hutool/hutool-all) | jdk17编译,使用Jakarta EE,适配17+ |
## 🛠️包含组件

View File

@@ -19,6 +19,7 @@ package cn.hutool.v7.core.annotation;
import cn.hutool.v7.core.reflect.method.MethodUtil;
import cn.hutool.v7.core.text.StrUtil;
import java.io.Serial;
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationHandler;

View File

@@ -100,13 +100,13 @@ public class AbstractEnhancedWrappedStreamTest {
@Test
public void testToZip() {
final List<Integer> orders = asList(1, 2, 3);
final List<String> list = asList("dromara", "hutool", "sweet");
final List<String> list = asList("bugotech", "hutool", "sweet");
final Map<Integer, String> toZip = wrap(orders).toZip(list);
Assertions.assertEquals(new HashMap<Integer, String>() {
private static final long serialVersionUID = 1L;
{
put(1, "dromara");
put(1, "bugotech");
put(2, "hutool");
put(3, "sweet");
}

View File

@@ -63,28 +63,28 @@ public class BeanTreeTest {
public void setUp() {
originJavaBeanList = EasyStream
.of(
JavaBean.builder().id(1L).name("dromara").matchParent(true).build(),
JavaBean.builder().id(2L).name("baomidou").matchParent(true).build(),
JavaBean.builder().id(1L).name("bugotech").matchParent(true).build(),
JavaBean.builder().id(2L).name("abcde").matchParent(true).build(),
JavaBean.builder().id(3L).name("hutool").parentId(1L).build(),
JavaBean.builder().id(4L).name("sa-token").parentId(1L).build(),
JavaBean.builder().id(5L).name("mybatis-plus").parentId(2L).build(),
JavaBean.builder().id(4L).name("sasa").parentId(1L).build(),
JavaBean.builder().id(5L).name("cde").parentId(2L).build(),
JavaBean.builder().id(6L).name("Looly").parentId(3L).build(),
JavaBean.builder().id(7L).name("click33").parentId(4L).build(),
JavaBean.builder().id(8L).name("jobob").parentId(5L).build()
).toList();
originJavaBeanTree = asList(
JavaBean.builder().id(1L).name("dromara").matchParent(true)
JavaBean.builder().id(1L).name("bugotech").matchParent(true)
.children(asList(
JavaBean.builder().id(3L).name("hutool").parentId(1L)
.children(singletonList(JavaBean.builder().id(6L).name("Looly").parentId(3L).build()))
.build(),
JavaBean.builder().id(4L).name("sa-token").parentId(1L)
JavaBean.builder().id(4L).name("sasa").parentId(1L)
.children(singletonList(JavaBean.builder().id(7L).name("click33").parentId(4L).build()))
.build()))
.build(),
JavaBean.builder().id(2L).name("baomidou").matchParent(true)
JavaBean.builder().id(2L).name("abcde").matchParent(true)
.children(singletonList(
JavaBean.builder().id(5L).name("mybatis-plus").parentId(2L)
JavaBean.builder().id(5L).name("cde").parentId(2L)
.children(singletonList(
JavaBean.builder().id(8L).name("jobob").parentId(5L).build()
))
@@ -113,7 +113,7 @@ public class BeanTreeTest {
public void testFilter() {
final List<JavaBean> javaBeanTree = beanTree.filter(originJavaBeanTree, s -> "Looly".equals(s.getName()));
Assertions.assertEquals(singletonList(
JavaBean.builder().id(1L).name("dromara").matchParent(true)
JavaBean.builder().id(1L).name("bugotech").matchParent(true)
.children(singletonList(JavaBean.builder().id(3L).name("hutool").parentId(1L)
.children(singletonList(JavaBean.builder().id(6L).name("Looly").parentId(3L).build()))
.build()))
@@ -125,17 +125,17 @@ public class BeanTreeTest {
public void testForeach() {
final List<JavaBean> javaBeanList = beanTree.forEach(originJavaBeanTree, s -> s.setName("【open source】" + s.getName()));
Assertions.assertEquals(asList(
JavaBean.builder().id(1L).name("【open source】dromara").matchParent(true)
JavaBean.builder().id(1L).name("【open source】bugotech").matchParent(true)
.children(asList(JavaBean.builder().id(3L).name("【open source】hutool").parentId(1L)
.children(singletonList(JavaBean.builder().id(6L).name("【open source】Looly").parentId(3L).build()))
.build(),
JavaBean.builder().id(4L).name("【open source】sa-token").parentId(1L)
JavaBean.builder().id(4L).name("【open source】sasa").parentId(1L)
.children(singletonList(JavaBean.builder().id(7L).name("【open source】click33").parentId(4L).build()))
.build()))
.build(),
JavaBean.builder().id(2L).name("【open source】baomidou").matchParent(true)
JavaBean.builder().id(2L).name("【open source】abcde").matchParent(true)
.children(singletonList(
JavaBean.builder().id(5L).name("【open source】mybatis-plus").parentId(2L)
JavaBean.builder().id(5L).name("【open source】cde").parentId(2L)
.children(singletonList(
JavaBean.builder().id(8L).name("【open source】jobob").parentId(5L).build()
))

View File

@@ -14,7 +14,7 @@
# limitations under the License.
#
# 实现:org.dromara.hutool.extra.template.engine.TemplateEngine
# 实现:cn.hutool.v7.extra.template.engine.TemplateEngine
cn.hutool.v7.extra.template.engine.beetl.BeetlEngine
cn.hutool.v7.extra.template.engine.freemarker.FreemarkerEngine

20
pom.xml
View File

@@ -120,26 +120,6 @@
<name>CherryRum</name>
<email>yulin.1996@foxmail.com</email>
</developer>
<developer>
<name>Emptypoint</name>
<email>1215582715@qq.com</email>
</developer>
<developer>
<name>Createsequence</name>
<email>cn.createsequence@gmail.com</email>
</developer>
<developer>
<name>TianPeiRong</name>
<email>canghaihongxin@163.com</email>
</developer>
<developer>
<name>Dazer007</name>
<email>dazer007@163.com</email>
</developer>
<developer>
<name>Aihuahua</name>
<email>aihuahua522@qq.com</email>
</developer>
</developers>
<scm>