From b15d13c24cce9c4c89c432cf477d09def10226df Mon Sep 17 00:00:00 2001 From: slam Date: Wed, 7 Sep 2022 09:28:10 +0800 Subject: [PATCH] #11754 - HttpSecurityDsl should support apply method - Polish javadoc in Kotlin DSL --- .../config/annotation/web/HttpSecurityDsl.kt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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() + * } * } * ``` *