浏览代码

Polish RequestCache continue Kolin Configuration

Issue gh-12089
Rob Winch 2 年之前
父节点
当前提交
5721b0351e
共有 1 个文件被更改,包括 10 次插入14 次删除
  1. 10 14
      docs/modules/ROOT/partials/servlet/architecture/request-cache-continue.adoc

+ 10 - 14
docs/modules/ROOT/partials/servlet/architecture/request-cache-continue.adoc

@@ -19,20 +19,16 @@ DefaultSecurityFilterChain springSecurity(HttpSecurity http) throws Exception {
 .Kotlin
 [source,kotlin,role="secondary"]
 ----
-@EnableWebSecurity
-class SecurityConfig {
-
-	@Bean
-	open fun springSecurity(http: HttpSecurity): SecurityFilterChain {
-		val httpRequestCache = HttpSessionRequestCache()
-		httpRequestCache.setMatchingRequestParameterName("continue")
-		http {
-			requestCache {
-				requestCache = httpRequestCache
-			}
-		}
-		return http.build()
-	}
+@Bean
+open fun springSecurity(http: HttpSecurity): SecurityFilterChain {
+    val httpRequestCache = HttpSessionRequestCache()
+    httpRequestCache.setMatchingRequestParameterName("continue")
+    http {
+        requestCache {
+            requestCache = httpRequestCache
+        }
+    }
+    return http.build()
 }
 ----