Polishing contribution

Closes gh-30014
This commit is contained in:
rstoyanchev 2023-02-27 17:18:53 +00:00
parent 5d6f151031
commit acedbfbaba
1 changed files with 8 additions and 11 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2021 the original author or authors. * Copyright 2002-2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -29,16 +29,13 @@ import org.springframework.http.server.RequestPath;
import org.springframework.web.util.ServletRequestPathUtils; import org.springframework.web.util.ServletRequestPathUtils;
/** /**
* A {@code Filter} to {@link ServletRequestPathUtils#parseAndCache parse} * {@code Filter} that {@link ServletRequestPathUtils#parseAndCache parses and
* and cache a {@link org.springframework.http.server.RequestPath} for further * caches} a {@link org.springframework.http.server.RequestPath} that can then
* {@link ServletRequestPathUtils#getParsedRequestPath access} throughout the * be accessed via {@link ServletRequestPathUtils#getParsedRequestPath}.
* filter chain. This is useful when parsed * <p><strong>Note:</strong> The {@code DispatcherServlet} already does the same,
* {@link org.springframework.web.util.pattern.PathPattern}s are in use anywhere * and therefore, this filter is mainly useful if you need to also have the
* in an application instead of String pattern matching with * parsed path available in the filter chain before and after the
* {@link org.springframework.util.PathMatcher}. * {@code DispatcherServlet}.
* <p>Note that in Spring MVC, the {@code DispatcherServlet} will always parse and
* cache the {@code RequestPath} if it detects that parsed {@code PathPatterns}
* are enabled for any {@code HandlerMapping}.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @since 5.3 * @since 5.3