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
Copy file name to clipboardExpand all lines: CLAUDE.md
+70-8Lines changed: 70 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
7
7
Spring User Framework is a reusable Spring Boot library (not an application) that provides user authentication and management features built on Spring Security. It supports Spring Boot 4.0 (Java 21+) and Spring Boot 3.5 (Java 17+).
8
8
9
+
**This is a library, not an app.** All Spring Boot starters are `compileOnly` dependencies. Consuming applications provide their own database, mail server, and security configuration. Never add Spring starters as `implementation` dependencies.
-`UserAutoConfigurationRegistrar` dynamically registers the library package for entity/repository scanning
90
+
- No conditional annotations — all features load, controlled by `user.*` properties
91
+
92
+
### Startup Behavior
93
+
94
+
-`RolePrivilegeSetupService` listens for `ContextRefreshedEvent` and creates/updates Role and Privilege entities from `user.roles-and-privileges` config. Must complete before any auth requests.
95
+
-`PasswordHashTimeTester` runs async on `ApplicationStartedEvent` to benchmark bcrypt performance (controlled by `user.security.testHashTime`).
96
+
97
+
### Design Decisions to Preserve
98
+
99
+
-`UserService.createUser()` uses `@Transactional(isolation = Isolation.SERIALIZABLE)` to prevent race conditions during concurrent registration
Version is in `gradle.properties`. Do not manually update version numbers. The release process (`./gradlew release`) handles versioning, changelog generation, tagging, and Maven Central publishing automatically.
0 commit comments