Relative Content

Tag Archive for javaspring-bootgradle.env

Spring Boot Not Loading Variables from .env Using java-dotenv [duplicate]

This question already has answers here: Using dotenv files with Spring Boot (3 answers) Closed 3 days ago. I’m trying to load environment variables from a .env file in my Spring Boot app using: implementation ‘io.github.cdimascio:java-dotenv:5.2.2’ Here’s part of my application.properties: spring.datasource.url=${DB_URL} spring.datasource.username=postgres spring.datasource.password=${DB_PASSWORD} stripe.api.key=${STRIPE_API_KEY} My .env file: DB_URL=jdbc:postgresql://localhost:5432/mydb DB_PASSWORD=mysecretpassword STRIPE_API_KEY=my_stripe_key The environment variables are […]

Spring Boot Not Loading Variables from .env Using java-dotenv [duplicate]

This question already has answers here: Using dotenv files with Spring Boot (3 answers) Closed 3 days ago. I’m trying to load environment variables from a .env file in my Spring Boot app using: implementation ‘io.github.cdimascio:java-dotenv:5.2.2’ Here’s part of my application.properties: spring.datasource.url=${DB_URL} spring.datasource.username=postgres spring.datasource.password=${DB_PASSWORD} stripe.api.key=${STRIPE_API_KEY} My .env file: DB_URL=jdbc:postgresql://localhost:5432/mydb DB_PASSWORD=mysecretpassword STRIPE_API_KEY=my_stripe_key The environment variables are […]

Spring Boot Not Loading Variables from .env Using java-dotenv [duplicate]

This question already has answers here: Using dotenv files with Spring Boot (3 answers) Closed 3 days ago. I’m trying to load environment variables from a .env file in my Spring Boot app using: implementation ‘io.github.cdimascio:java-dotenv:5.2.2’ Here’s part of my application.properties: spring.datasource.url=${DB_URL} spring.datasource.username=postgres spring.datasource.password=${DB_PASSWORD} stripe.api.key=${STRIPE_API_KEY} My .env file: DB_URL=jdbc:postgresql://localhost:5432/mydb DB_PASSWORD=mysecretpassword STRIPE_API_KEY=my_stripe_key The environment variables are […]