Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add environment variables in IntelliJ Spring Boot project

I Am trying to add an environmental variable inside my spring-boot application.properties file. I know how to add it normally on a non spring-boot project, but I cannot find the field for adding environment variables, this is all I see:

this is all I see

This is my application.properties file, this may help.

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/FTHLDB
spring.datasource.username=root
spring.datasource.password=${MYSQL_PASS}
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
spring.jpa.properties.hibernate.format_sql=true
like image 986
SeriousProgrammm...brrrr Avatar asked Feb 01 '26 06:02

SeriousProgrammm...brrrr


1 Answers

The UI of Run/Debug Configurations has changed. Under 'Modify Options' select 'Environment Variables' under 'Operating System'.

Screenshot of explanation

like image 62
Joe Tobin Avatar answered Feb 02 '26 21:02

Joe Tobin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!