@ -71,6 +71,60 @@ open fun springSecurity(http: HttpSecurity): SecurityFilterChain {
@@ -71,6 +71,60 @@ open fun springSecurity(http: HttpSecurity): SecurityFilterChain {
----
====
If this breaks your application, then you can explicitly opt into the 5.8 defaults using the following configuration:
In Spring Security 5, the default behavior is for the xref:servlet/authentication/architecture.adoc#servlet-authentication-securitycontext[`SecurityContext`] to automatically be saved to the xref:servlet/authentication/persistence.adoc#securitycontextrepository[`SecurityContextRepository`] using the xref:servlet/authentication/persistence.adoc#securitycontextpersistencefilter[`SecurityContextPersistenceFilter`].