Tentei usar o codigo abaixo não fuciona apos atualização do org.springframework.security.config.annotation.web.builders.HttpSecurity
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
return http.csrf().disable()
.authorizeHttpRequests()
.requestMatchers("/h2-console/**").permitAll()
.and().headers().frameOptions().sameOrigin()
.and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and().build();
}