How shashanthrao/springboot works
This is a Spring Boot employee CRUD application whose distinctive runtime feature is live rotation of short-lived MySQL credentials from Vault without restarting. The documented credential path is Vault lease events → credential manager → replacement Hikari pool → blue/green data source; the separate employee CRUD path is represented from the repository structure, but its call sequence is unverified because no source excerpts were provided.
Main entry points: VaultDatabaseCredentialsManager.java Credential Manager · EmployeeService.java Employee Service · BlueGreenDataSource.java Blue-Green Data Source · EmployeeController.java Employee API
Components 14
Employee CRUD
- Employee API
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/EmployeeController.java - Employee Service
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/EmployeeService.java - Employee Repository
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/EmployeeRepository.java - Employee Record
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/Employee.java
Vault Credentials
- Lease Listener
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/vault/VaultDatabaseCredentialsManager.java - Credential Manager
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/vault/VaultDatabaseCredentialsManager.java - Database Credentials
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/vault/DatabaseCredentials.java
Pool Lifecycle
- Blue-Green Data Source
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/vault/BlueGreenDataSource.java - Data Source Config
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/config/DataSourceConfig.java
Application Setup
- Spring Boot App
employee-crud-vault-relogin-refresh-single-db/src/main/java/com/example/employee/EmployeeCrudApplication.java - Runtime Properties
employee-crud-vault-relogin-refresh-single-db/src/main/resources/application.properties
Other components
- Employee Client
- MySQL Database
- HashiCorp Vault
Connections 13
- Employee Client → Employee API: uses API
- Employee API → Employee Service: delegates to
- Employee Service → Employee Repository: uses
- Employee Repository → MySQL Database: persists records
- Employee Service → Employee Record: handles records
- Lease Listener → HashiCorp Vault: subscribes to leases
- Lease Listener → Credential Manager: delivers rotation events
- Credential Manager → Database Credentials: receives credentials
- Credential Manager → Blue-Green Data Source: builds replacement pool
- Blue-Green Data Source → MySQL Database: connects to
- Data Source Config → Blue-Green Data Source: exposes data source
- Runtime Properties → Credential Manager: configures Vault access
- Spring Boot App → Data Source Config: starts application