docs: private static String getRootPath(final String locationPattern) {
  
          int rootDirEnd = locationPattern.length();
  
          while (AntPathMatcher.isPattern(locationPattern.substring(0, rootDirEnd))) {
              rootDirEnd = locationPattern.lastIndexOf('/', rootDirEnd - 2) + 1;
          }
          return locationPattern.substring(0, rootDirEnd);
      }