finalizei o curso com êxito .. porem alguns methodos estão depreciados .. gostaria de saber se a alguma atualização estou usando : org.springframework.boot:spring-boot-starter-web:3.2.0 org.springframework.boot:spring-boot-starter-security:3.2.0 org.springframework.security:spring-security-test:6.2.0 com.auth0:java-jwt:4.2.1
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { return http.csrf().disable() .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and().authorizeHttpRequests() .requestMatchers(HttpMethod.POST, "/login").permitAll() //.requestMatchers(HttpMethod.DELETE, "/medicos").hasRole("ADMIN") //.requestMatchers(HttpMethod.DELETE, "/pacientes").hasRole("ADMIN") .anyRequest().authenticated() .and().addFilterBefore(securityFilter, UsernamePasswordAuthenticationFilter.class) .build();
segue as metros em negrito..
obs: o codigo fuicina nomal , porem queria uma alternativa para evitar erros futuros .