JAVA-15689 Update spring-activiti module to remove usage of deprecated WebSecurityConfigurerAdapter (#13141)

This commit is contained in:
anuragkumawat 2022-12-11 12:14:57 +05:30 committed by GitHub
parent 5eddf177a5
commit 6fb90f67eb
1 changed files with 5 additions and 3 deletions

View File

@ -3,16 +3,17 @@ package com.baeldung.activiti.security.withspring;
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.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
public class SecurityConfig {
protected void configure(HttpSecurity http) throws Exception {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.antMatcher("/**")
.authorizeRequests()
.antMatchers("/protected-process*")
@ -29,6 +30,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.disable()
.logout()
.logoutSuccessUrl("/login");
return http.build();
}
@Bean