Using dotenv files with Spring Boot
问题 I'd like to use dotenv files to configure my Spring Boot application. What is the best way to do this? In Ruby or Node world, I just creating .env file and it loads all stuff from there to application environment. I don't like to create separate profiles for my app etc. I just want to load any environment variables I specified in file into my app. 回答1: I have built a proper integration between Spring and dotenv. Follow this thread to understand the motivation. And then review the library: