Skip to content

Commit

Permalink
fix(持久化模块): 修复Bean排序工具类BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
houtaroy committed Nov 15, 2023
1 parent 3641228 commit d9fc74b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
* Spring Bean 帮助类
Expand All @@ -18,7 +19,7 @@ public abstract class BeanOrderUtils {

public static <T> List<T> sort(List<T> beans) {
List<T> result = new ArrayList<>(beans.size());
List<T> orders = beans.stream().filter(BeanOrderUtils::isOrderly).toList();
List<T> orders = beans.stream().filter(BeanOrderUtils::isOrderly).collect(Collectors.toList());
AnnotationAwareOrderComparator.sort(orders);
result.addAll(orders);
result.addAll(beans.stream().filter(bean -> !isOrderly(bean)).toList());
Expand Down

0 comments on commit d9fc74b

Please sign in to comment.