Browse Source

Polishing

pull/33770/head
rstoyanchev 1 year ago
parent
commit
5271f5b8a1
  1. 10
      spring-webmvc/src/main/java/org/springframework/web/servlet/function/PathResourceLookupFunction.java

10
spring-webmvc/src/main/java/org/springframework/web/servlet/function/PathResourceLookupFunction.java

@ -61,7 +61,7 @@ class PathResourceLookupFunction implements Function<ServerRequest, Optional<Res @@ -61,7 +61,7 @@ class PathResourceLookupFunction implements Function<ServerRequest, Optional<Res
}
pathContainer = this.pattern.extractPathWithinPattern(pathContainer);
String path = processPath(pathContainer.value());
String path = ResourceHandlerUtils.normalizeInputPath(pathContainer.value());
if (ResourceHandlerUtils.shouldIgnoreInputPath(path)) {
return Optional.empty();
}
@ -84,14 +84,6 @@ class PathResourceLookupFunction implements Function<ServerRequest, Optional<Res @@ -84,14 +84,6 @@ class PathResourceLookupFunction implements Function<ServerRequest, Optional<Res
}
}
/**
* Process the given resource path.
* <p>By default, this method delegates to {@link ResourceHandlerUtils#normalizeInputPath}.
*/
protected String processPath(String path) {
return ResourceHandlerUtils.normalizeInputPath(path);
}
@Override
public String toString() {
return this.pattern + " -> " + this.location;

Loading…
Cancel
Save