parent
b6d61b2f10
commit
e9506776f1
|
|
@ -41,13 +41,13 @@ import org.springframework.security.web.context.SecurityContextRepository;
|
|||
import org.springframework.security.web.csrf.CsrfFilter;
|
||||
import org.springframework.security.web.csrf.CsrfTokenRepository;
|
||||
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository;
|
||||
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||
import org.springframework.security.web.util.matcher.AnyRequestMatcher;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher.pathPattern;
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public class WebTestUtilsTests {
|
||||
|
|
@ -226,7 +226,7 @@ public class WebTestUtilsTests {
|
|||
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||
// @formatter:off
|
||||
http
|
||||
.securityMatcher(new AntPathRequestMatcher("/willnotmatchthis"));
|
||||
.securityMatcher(pathPattern("/willnotmatchthis"));
|
||||
return http.build();
|
||||
// @formatter:on
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue