https://github.com/furkankayam/spring-boot-vault-config
✅ Secure configuration and secrets management in Spring Boot using HashiCorp Vault
https://github.com/furkankayam/spring-boot-vault-config
docker docker-compose gradle java spring-boot vault
Last synced: 3 months ago
JSON representation
✅ Secure configuration and secrets management in Spring Boot using HashiCorp Vault
- Host: GitHub
- URL: https://github.com/furkankayam/spring-boot-vault-config
- Owner: furkankayam
- License: mit
- Created: 2025-10-28T22:50:09.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-10-28T23:07:21.000Z (8 months ago)
- Last Synced: 2025-10-29T00:34:19.046Z (8 months ago)
- Topics: docker, docker-compose, gradle, java, spring-boot, vault
- Language: Java
- Homepage:
- Size: 645 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔒 Spring Boot Vault Config
- ✅ **This project demonstrates HashiCorp Vault integration for securely managing sensitive information (credentials, API keys, database passwords, etc.) in Spring Boot applications**
Used Technologies in The Project:
[](https://www.java.com/en/)
[](https://spring.io/)
[](https://www.vaultproject.io/)
[](https://gradle.org/)
[](https://docs.docker.com/)
## 📖 Documentation
[](./VAULT_SETUP.md)
## 🚀 How to Run
1. **Start Vault** (See Documentation section above)
2. **Run the Application**
```sh
./gradlew bootRun
The application will start on http://localhost:8080
```
## 🔌 API Endpoints
### Test Endpoint
**GET** `http://localhost:8080/hello`
Returns the secret value from Vault.
### Refresh Configuration
**POST** `http://localhost:8080/actuator/refresh`
Refreshes the application configuration from Vault without restarting the application.
**Example with cURL:**
```bash
curl -X POST http://localhost:8080/actuator/refresh
```
📸 Click to see the refresh response

The response shows which configuration properties were successfully reloaded from Vault.
## 🔄 Dynamic Configuration Update
This project uses `@RefreshScope` to enable dynamic configuration updates:
Update your secret value in Vault
Call the refresh endpoint: POST http://localhost:8080/actuator/refresh
The new value will be reflected immediately without restarting the application
**Example Flow:**
```sh
# 1. Check current value
curl http://localhost:8080/hello
# 2. Update value in Vault UI
# 3. Refresh configuration
curl -X POST http://localhost:8080/actuator/refresh
# 4. Check updated value
curl http://localhost:8080/hello
```
## 📄 License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details
**Created by** [Mehmet Furkan KAYA](https://www.linkedin.com/in/mehmet-furkan-kaya/)