diff --git a/spring-activiti/src/main/java/com/baeldung/activiti/security/withspring/SecurityConfig.java b/spring-activiti/src/main/java/com/baeldung/activiti/security/withspring/SecurityConfig.java index b0c74371c7..8dc3eee05e 100644 --- a/spring-activiti/src/main/java/com/baeldung/activiti/security/withspring/SecurityConfig.java +++ b/spring-activiti/src/main/java/com/baeldung/activiti/security/withspring/SecurityConfig.java @@ -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