#WebSecurityConfigurerAdapter cannot be resolved to a type.

1 messages · Page 1 of 1 (latest)

undone scaffold
#

Is there any alternative to use this class?

leaden wharfBOT
#

<@&1004656351647117403> please have a look, thanks.

gray heron
undone scaffold
woeful blaze
# undone scaffold Then tell me about SecurityFilterChain, how can I use it?

chck this example

@Configuration
@EnableWebSecurity
public class SecurityConfig {
  @Bean
  public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
      http.authorizeHttpRequests((authorize) -> authorize
          .requestMatchers("/*/**.html", "/*/**.css", "/*/**.js", "/*/**.png")
          .permitAll()
          .requestMatchers(HttpMethod.GET, "/hello")
          .permitAll()
          .anyRequest()
          .authenticated());
  
      return http.build();
  }
}
woeful blaze
#

👍