Skip to content

Commit 0b062e7

Browse files
committed
Adjust to changes in Spring Security.
Signed-off-by: Olga Maciaszek-Sharma <[email protected]>
1 parent 566dae6 commit 0b062e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/test/NoSecurityConfiguration.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2022 the original author or authors.
2+
* Copyright 2013-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,14 +19,16 @@
1919
import org.springframework.context.annotation.Bean;
2020
import org.springframework.context.annotation.Configuration;
2121
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
22+
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
2223
import org.springframework.security.web.SecurityFilterChain;
2324

2425
@Configuration(proxyBeanMethods = false)
2526
public class NoSecurityConfiguration {
2627

2728
@Bean
2829
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
29-
http.authorizeRequests().anyRequest().permitAll().and().csrf().disable();
30+
http.authorizeHttpRequests(authorizeRequests -> authorizeRequests.anyRequest().permitAll())
31+
.csrf(AbstractHttpConfigurer::disable);
3032
return http.build();
3133
}
3234

0 commit comments

Comments
 (0)