Spring Security

I wanna Config The Spring Config class but due to changemnet in version i am not able to do it . Can anyone Help
package com.ShelfSpace.ShelfSpace.Config;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.SecurityFilterChain;

@Configuration
public class SecurityConfiguration{
    
    public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception {
    
         httpSecurity.authorizeHttpRequests(x->{
            x.requestMatchers("/").permitAll();
        });
         
         return  httpSecurity.build();
    }
}
i want to make a custom login page and authenticate every endpoint excpet the
/
this one how could i achieve it ?
Was this page helpful?