#51751·Spring Boot

Add support for initializing the schema that Spring Security supports

Author: joshlongCreated Sep 15, 2026Updated Sep 15, 2026
Labelstype: enhancementstatus: blocked

Hi team, I've been working extensively with Spring Security recently. Countless parts of Spring Security store state—by default in memory - but many SPIs also provide SQL-backed implementations. It would be great if we could standardize these implementations and expose a consistent initialize-schema property for them.

Examples include:

  • JdbcUserDetailsManager: Stores users and their authorities in SQL (a core part of Spring Security for years).
  • JdbcRegisteredClientRepository: Stores OAuth2 Authorization Server client definitions.
  • JdbcOAuth2AuthorizationConsentService: Manages user consent for granted scopes.
  • JdbcOAuth2AuthorizationService: Stores active OAuth2 authorizations.

We often discuss stateless APIs, but state always exists somewhere—frequently within the security context. Right now, we lack a seamless, out-of-the-box (OOTB) experience for handling that state cleanly in Spring Boot.

Feature Request: Could we collaborate to make the necessary updates in Spring Security so Spring Boot can, in turn, provide first-class auto-configuration and configuration properties (spring.security.*.initialize-schema) for these SQL-backed components?

Source: spring-projects/spring-boot