https://blog.csdn.net/Vansonh...
源码:
public List<String> getInPriorityOrder(Collection<String> classNames) {
final AutoConfigurationSorter.AutoConfigurationClasses classes =
new AutoConfigurationSorter.AutoConfigurationClasses(this.metadataReaderFactory, this.autoConfig)
List<String> orderedClassNames = new ArrayList(classNames);
// ⾸先根据ASCII来进⾏排序
Collections.sort(orderedClassNames);
// 根据 Order
Collections.sort(orderedClassNames, new Comparator<String>() {
public int compare(String o1, String o2) {
int i1 = classes.get(o1).getOrder();
int i2 = classes.get(o2).getOrder();
return i1 < i2 ? -1 : (i1 > i2 ? 1 : 0);
}
});
// 根据 @AutoConfigureAfter @AutoConfigureBefore
List<String> orderedClassNames = this.sortByAnnotation(classes, orderedClassNames);
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。