Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/modules/ROOT/pages/migration-7/web.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -414,22 +414,22 @@ Instead of taking this responsibility away from developers, now it is simpler to

[method,java]
----
PathPatternRequestParser.Builder servlet = PathPatternRequestParser.withDefaults().basePath("/mvc");
PathPatternRequestMatcher.Builder servlet = PathPatternRequestMatcher.withDefaults().basePath("/mvc");
http
.authorizeHttpRequests((authorize) -> authorize
.requestMatchers(servlet.pattern("/orders/**").matcher()).authenticated()
.requestMatchers(servlet.matcher("/orders/**")).authenticated()
)
----


For paths that belong to the default servlet, use `PathPatternRequestParser.withDefaults()` instead:
For paths that belong to the default servlet, use `PathPatternRequestMatcher.withDefaults()` instead:

[method,java]
----
PathPatternRequestParser.Builder request = PathPatternRequestParser.withDefaults();
PathPatternRequestMatcher.Builder request = PathPatternRequestMatcher.withDefaults();
http
.authorizeHttpRequests((authorize) -> authorize
.requestMatchers(request.pattern("/js/**").matcher()).authenticated()
.requestMatchers(request.matcher("/js/**")).authenticated()
)
----

Expand Down
Loading