Failed to run SB using Eclipse IDE run command using environment variables in application properties

Since GitGuardian noticed that I push hardcoded password I decided to create
.env
files. However the application cannot load these variables values from the shell context and instead it is using placeholders and then fail to load the database and thus the application. What should I do? I have such application properties:
server.port=9400
spring.datasource.url=jdbc:mysql://localhost:3306/......
spring.datasource.username=${DATABASE_USERNAME}
spring.datasource.password=${DATABASE_PASSWORD}

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

# Enable Hibernate SQL logging
logging.level.org.hibernate.SQL=DEBUG

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto=update
# Maximum size allowed for file uploads
spring.servlet.multipart.max-file-size=40MB
# Maximum size allowed for multipart/form-data requests
spring.servlet.multipart.max-request-size=40MB

But when I start the application directly from Eclipse IDE by choosing command:
Run as.. > Spring Boot App
then it starts and encounters errors:

What to do?
image.png
Was this page helpful?