Hola a todos, en la clase de Spring Security cuando se configura el SecurityFilterChain para hacerlo STATELESS, me sale deprecated csrf(), sessionManagement() y and()...Busque informacion pero no he logrado encontrar nada concreto para solucionarlo.
package med.voll.api.infra.security;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
@EnableWebSecurity
public class SecurityConfigurations {
public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) {
return httpSecurity.csrf().disable().sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().build();
}
}