code: public static @NotNull String makeRelative(@NotNull String resourceType, @NotNull ResourceResolver resourceResolver) {
      String[] searchPaths = resourceResolver.getSearchPath();
      for (String prefix : searchPaths) {
        if (StringUtils.startsWith(resourceType, prefix)) {
          return resourceType.substring(prefix.length());
        }
      }
      return resourceType;
    }
docs: Makes the given resource type relative by stripping off any search path prefix.
  In case the given resource type does not start with any of these prefixes it is returned unmodified.
  @param resourceType The resource type to make relative.
  @param resourceResolver Resource resolver
  @return Relative resource type