It would be easier to use RequestMatcherDelegatingAuthorizationManager.Builder if it used builder methods similar to MessageMatcherDelegatingAuthorizationManager.Builder.

Specifically, it would be nice to be able to do things like the following:

RequestMatcherDelegatingAuthorizationManager.builder()
    .requestMatchers(new RegexRequestMatcher(...)).hasAuthority("message:read")
    .requestMatchers(new RegexRequestMatcher(...)).hasAuthority("message:read")
    .anyRequest().authenticated()
    .build();

Then, when applications need to decorate AuthorizationManager behavior, they can still take advantage of the authorization DSL.

Given #11347, this ticket should only introduce anyRequest and requestMatchers.

Comment From: evgeniycheban

@jzheaux I can work on it.

Comment From: marcusdacoregio

Closing in favor of https://github.com/spring-projects/spring-security/pull/13110