Skip to content

Commit 9d91dbc

Browse files
committed
Use explicit matchers following Spring Security 6.0.5 upgrade
See gh-36293
1 parent 0233178 commit 9d91dbc

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/src/main/java/smoketest/actuator/customsecurity

1 file changed

+2
-2
lines changed

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/src/main/java/smoketest/actuator/customsecurity/SecurityConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ SecurityFilterChain configure(HttpSecurity http, HandlerMappingIntrospector hand
6666
requests.requestMatchers(EndpointRequest.toAnyEndpoint().excluding(MappingsEndpoint.class))
6767
.hasRole("ACTUATOR");
6868
requests.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll();
69-
requests.requestMatchers("/foo").permitAll();
70-
requests.requestMatchers(new AntPathRequestMatcher("/error")).permitAll();
69+
requests.requestMatchers(new AntPathRequestMatcher("/foo")).permitAll();
70+
requests.requestMatchers(new MvcRequestMatcher(handlerMappingIntrospector, "/error")).permitAll();
7171
requests.requestMatchers(new AntPathRequestMatcher("/**")).hasRole("USER");
7272
});
7373
http.cors(Customizer.withDefaults());

0 commit comments

Comments
 (0)