易于使用的用户管理框架/入门应用程序,适用于 Spring。提供注册、登录、注销等功能,这些功能基于 Spring Security。
易于使用的用户管理框架/入门应用程序,适用于 Spring。提供注册、登录、注销等功能,这些功能基于 Spring Security。
A comprehensive Spring Boot User Management Framework that simplifies the implementation of robust user authentication and management features. Built on top of Spring Security, this library provides ready-to-use solutions for user registration, login, account management, and more.
Check out the Spring User Framework Demo Application for a complete example of how to use this library.
User Registration and Authentication
application.yml.Advanced Security
Extensible Architecture
Developer-Friendly
GDPR Compliance (opt-in)
Choose the version that matches your Spring Boot version:
| Spring Boot Version | Framework Version | Java Version | Spring Security |
|---|---|---|---|
| 4.0.x – 4.1.x | 5.3.x | 21+ | 7.x |
| 3.5.x | 3.6.x | 17+ | 6.x |
Versioning note: This library follows Semantic Versioning for its own API; its major version is intentionally not aligned with Spring Boot's major version. The 5.3.x line is built and verified against Spring Boot 4.1.0 and also runs on 4.0.x — all Spring Boot starters are
compileOnly, so your application picks the exact Spring Boot patch version. The5.0.xline is a breaking release over4.4.x; read the Migration Guide ("Migrating to 5.0.x") before upgrading — note especially the reverse-proxyuser.security.appUrlrequirement.
Spring Boot 4.x brings significant changes including Spring Security 7 and requires Java 21. The 5.x line is built and verified against Spring Boot 4.1.0 and is compatible with 4.0.x.
Maven:
com.digitalsanctuary
ds-spring-user-framework
5.3.4
Gradle:
implementation 'com.digitalsanctuary:ds-spring-user-framework:5.3.4'When upgrading to Spring Boot 4.0, be aware of these important changes:
/@AutoConfigureMockMvc → org.springframework.boot.webmvc.test.autoconfigure@DataJpaTest → org.springframework.boot.data.jpa.test.autoconfigure@WebMvcTest → org.springframework.boot.webmvc.test.autoconfigureFor testing, you may need these additional dependencies:
testImplementation 'org.springframework.boot:spring-boot-data-jpa-test'
testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
testImplementation 'org.springframework.boot:spring-boot-starter-security-test'Upgrading from 3.x, or from 4.4.x? See the Migration Guide for detailed upgrade instructions. The 4.4.x → 5.0.x jump is a breaking release (security, schema, API, and auto-configuration changes) — review "Migrating to 5.0.x" before upgrading.
For projects using Spring Boot 3.5.x with Java 17+:
Security-maintenance only. The
3.6.xline backports security fixes from the 5.x line that apply to Spring Boot 3.5; new feature development happens on5.3.x. If you are on Java 21 / Spring Boot 4, use5.3.x.
Maven:
com.digitalsanctuary
ds-spring-user-framework
3.6.0
Gradle:
implementation 'com.digitalsanctuary:ds-spring-user-framework:3.6.0'If you're upgrading from a previous version, see the Migration Guide for:
Follow these steps to get up and running with the Spring User Framework in your application.
Add the main framework dependency (see Installation for version selection):
Spring Boot 4.0 / 4.1 (Java 21+):
implementation 'com.digitalsanctuary:ds-spring-user-framework:5.3.4'Spring Boot 3.5 (Java 17+):
implementation 'com.digitalsanctuary:ds-spring-user-framework:3.6.0'Add required dependencies:
Important: This framework requires these additional Spring Boot starters to function properly:
Maven:
org.springframework.boot
spring-boot-starter-thymeleaf
org.springframework.boot
spring-boot-starter-mail
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-security
org.springframework.boot
spring-boot-starter-oauth2-client
org.springframework.retry
spring-retry
2.0.13
Gradle:
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.retry:spring-retry:2.0.13'Notes:
spring-boot-starter-oauth2-client is required even if you don't plan to use social login. The framework's security chain wires OAuth2 user services at startup; the dependency must be on the classpath so the classes resolve. The OAuth2 login flow itself is disabled by default and opt-in — set spring.security.oauth2.enabled=true in your application properties only when you configure OAuth2 provider credentials (this is a framework property, not a standard Spring Security key).spring-retry needs an explicit version because Spring Boot's BOM may not manage this artifact. The version shown matches what the framework is built against.Configure your database in application.yml. The framework supports all databases compatible with Spring Data JPA:
MariaDB/MySQL:
spring:
datasource:
url: jdbc:mariadb://localhost:3306/yourdb?createDatabaseIfNotExist=true
username:暂无开放 Issues,或尚未同步最近议题。