Skip to content

Commit a33f2de

Browse files
committed
Move off deprecation in Spring Security configuration for tests.
Related ticket #2271.
1 parent a30b7c8 commit a33f2de

File tree

1 file changed

+2
-1
lines changed
  • spring-data-rest-tests/spring-data-rest-tests-security/src/test/java/org/springframework/data/rest/tests/security

1 file changed

+2
-1
lines changed

spring-data-rest-tests/spring-data-rest-tests-security/src/test/java/org/springframework/data/rest/tests/security/SecurityConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.springframework.context.annotation.Bean;
2020
import org.springframework.context.annotation.Configuration;
2121
import org.springframework.http.HttpMethod;
22+
import org.springframework.security.config.Customizer;
2223
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
2324
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
2425
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -46,7 +47,7 @@ SecurityFilterChain filterChain(HttpSecurity security) throws Exception {
4647
.authorizeHttpRequests(it -> it.requestMatchers(HttpMethod.GET, "/")
4748
.permitAll().anyRequest().authenticated())
4849
.csrf(it -> it.disable())
49-
.httpBasic().and()
50+
.httpBasic(Customizer.withDefaults())
5051
.build();
5152
}
5253
}

0 commit comments

Comments
 (0)