diff --git a/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpSecurityDsl.kt b/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpSecurityDsl.kt index 1593869e192..b97dd0108a3 100644 --- a/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpSecurityDsl.kt +++ b/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpSecurityDsl.kt @@ -86,13 +86,15 @@ class HttpSecurityDsl(private val http: HttpSecurity, private val init: HttpSecu * ``` * @Configuration * @EnableWebSecurity - * class SecurityConfig : WebSecurityConfigurerAdapter() { + * class SecurityConfig { * - * override fun configure(http: HttpSecurity) { - * http { - * apply(CustomSecurityConfigurer()) - * } - * } + * @Bean + * fun securityFilterChain(http: HttpSecurity): SecurityFilterChain { + * http { + * apply(CustomSecurityConfigurer()) + * } + * return http.build() + * } * } * ``` *