code: public List<UnitInstance> filter(Collection<UnitInstance> instances) {
          List<UnitInstance> filtered = new ArrayList<>();
          for (String dependentApplication : EnvUtil.getDependentApplications()) {
              for (UnitInstance instance : instances) {
                  String application = NodeIdBean.parse(instance.getNodeId()).getApplication();
                  if (Objects.equals(application, EnvUtil.getApplication())) {
                      LOG.debug("优先考虑本地部署的dao unit,所以第一个添加进结果集");
                      filtered.add(instance);
                  } else if (Objects.equals(dependentApplication, application)) {
                      filtered.add(instance);
                  }
              }
          }
          return filtered;
      }
docs: 过滤并保序,返回的顺序与application.properties配置的优先级顺序一致
  
  @deprecated mapped dao applications are no longer configured in the application.properties,
  using this filter will cause a unit not available exception.