code: protected List<Middleware> getMiddleware(String name) {
          final List<Middleware> middleware = this.applicationContext
              .getBeansOfType(MiddlewareDefinition.class, true, false)
              .values()
              .stream()
              .flatMap(d -> d.getDefinition().entrySet().stream())
              .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))
              .get(name);
          return middleware == null ? Collections.emptyList() : middleware;
      }
docs: Resolves middleware assigned to action by it's name.