How does it work?
This tool converts text to Spring Boot environment variable format. Spring Boot allows you to override configuration properties using environment variables by following these conversion rules:
- All letters are converted to uppercase
- Dots (.), hyphens (-), and spaces are converted to underscores (_)
- CamelCase is converted to SNAKE_CASE (e.g., camelCase becomes CAMEL_CASE)
For example, "spring.datasource.url" becomes "SPRING_DATASOURCE_URL", and "app.feature.enabled" becomes "APP_FEATURE_ENABLED".
Examples of Spring Boot environment variable conversion
Original property names
spring.datasource.url
spring.datasource.username
server.port
app.feature.enabled
logging.level.root
my-custom-property
nested.property.with.dots
camelCaseProperty
PascalCaseExampleConverted to environment variables
SPRING_DATASOURCE_URL
SPRING_DATASOURCE_USERNAME
SERVER_PORT
APP_FEATURE_ENABLED
LOGGING_LEVEL_ROOT
MY_CUSTOM_PROPERTY
NESTED_PROPERTY_WITH_DOTS
CAMEL_CASE_PROPERTY
PASCAL_CASE_EXAMPLEThis conversion is particularly useful when:
- Setting up Spring Boot applications in containerized environments (Docker, Kubernetes)
- Configuring CI/CD pipelines with environment variables
- Following the twelve-factor app methodology for configuration
- Overriding application.properties or application.yml settings via environment variables
For example, if your application.properties has spring.datasource.url=jdbc:mysql://localhost/db, you can override it with an environment variable named SPRING_DATASOURCE_URL.
Other tools
See other tools