You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -354,7 +406,8 @@ To ensure `MultipartFilter` is specified before the Spring Security filter with
354
406
355
407
.Initializer MultipartFilter
356
408
====
357
-
[source,java]
409
+
.Java
410
+
[source,java,role="primary"]
358
411
----
359
412
public class SecurityApplicationInitializer extends AbstractSecurityWebApplicationInitializer {
360
413
@@ -364,6 +417,16 @@ public class SecurityApplicationInitializer extends AbstractSecurityWebApplicati
364
417
}
365
418
}
366
419
----
420
+
421
+
.Kotlin
422
+
[source,kotlin,role="secondary"]
423
+
----
424
+
class SecurityApplicationInitializer : AbstractSecurityWebApplicationInitializer() {
425
+
override fun beforeSpringSecurityFilterChain(servletContext: ServletContext?) {
426
+
insertFilters(servletContext, MultipartFilter())
427
+
}
428
+
}
429
+
----
367
430
====
368
431
369
432
To ensure `MultipartFilter` is specified before the Spring Security filter with XML configuration, users can ensure the <filter-mapping> element of the `MultipartFilter` is placed before the springSecurityFilterChain within the web.xml as shown below:
0 commit comments