全网找了好久Controller类中的方法(以下称为接口)排序,各种方法试了都不行
个人解决方案如下:
修改SpringDocAutoConfiguration中openApiCustomiser方法的返回值,根据接口名称重新排序
PlusPaths newPaths2 = newPaths.entrySet()
.stream()
.sorted(Map.Entry.<String, PathItem>comparingByValue((e1, e2) -> {
String desc1 = "";
Operation operation1 = getFirstOperation(e1);
if (operation1 != null) {
if (StrUtil.isNotBlank(operation1.getDescription(