diff options
Diffstat (limited to 'eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf')
-rw-r--r-- | eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/SpringSecurityConfiguration.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/SpringSecurityConfiguration.java b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/SpringSecurityConfiguration.java index b5054b70..2242b428 100644 --- a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/SpringSecurityConfiguration.java +++ b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/SpringSecurityConfiguration.java @@ -1,15 +1,16 @@ package at.gv.egiz.eaaf.utils.springboot.test.dummy; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.web.SecurityFilterChain; @Configuration -public class SpringSecurityConfiguration extends WebSecurityConfigurerAdapter { +public class SpringSecurityConfiguration { - @Override - public void configure(HttpSecurity http) throws Exception { - http.csrf().disable(); + @Bean + SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { + return http.csrf((csfr) -> csfr.disable()).build(); } |