Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/namikazebadri/spring-boot-env-properties
Exploratory Project for Spring Boot Env & Properties
https://github.com/namikazebadri/spring-boot-env-properties
environment-variables properties spring-boot
Last synced: about 1 month ago
JSON representation
Exploratory Project for Spring Boot Env & Properties
- Host: GitHub
- URL: https://github.com/namikazebadri/spring-boot-env-properties
- Owner: namikazebadri
- Created: 2024-07-04T13:13:34.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T23:50:34.000Z (6 months ago)
- Last Synced: 2024-07-09T04:02:22.892Z (6 months ago)
- Topics: environment-variables, properties, spring-boot
- Language: Kotlin
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot Env Properties
This project is an exploratory project where I demonstrated the use of environment variables and properties inside a spring project.
In this project you will find these:1. The use of environment variable inside properties file
2. The use of environment variable inside properties file with default value
3. Getting environment variable from `Environment` class
4. Getting environment variable from `Environment` class with default value
5. Getting properties data through `ConfigurationProperties` annotated class
6. Map properties data through `@value` annotation## Running this project
Set environment variables for:
```shell
export SERVICE_NAME=JustProps
```Run Spring Boot:
```shell
./gradlew bootRun
```## Author
[Unis Badri](https://unisbadri.com) ([email protected])