#WebSecurityConfigurerAdapter cannot be resolved to a type.
1 messages · Page 1 of 1 (latest)
<@&1004656351647117403> please have a look, thanks.
You shouldn't use a deprecated class? Why do you want to use it?
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();
}
}
Okay, I'll try this out.
👍