79615495

Date: 2025-05-10 13:02:08
Score: 0.5
Natty:
Report link

In your SecurityFilterChain bean try setting the session management to stateless, update it like this

 @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
        
        http.csrf().disable()
                .authorizeHttpRequests((authorize)->{
                    authorize.requestMatchers("/v1/open","/v1/open/**").permitAll();
                    authorize.anyRequest().authenticated();
                }).httpBasic(Customizer.withDefaults())
.sessionManagement(sessionManagement ->sessionManagement.sessionCreationPolicy(SessionCreationPolicy.STATELESS));
        return http.build();
    }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Zero764