What is the best way to read environment variables in SpringBoot? In Java I did it using:
String foo = System.getenv(\"
Alternatively, you can use the org.springframework.core.env.Environment interface to access environment variables:
org.springframework.core.env.Environment
@Autowired private Environment env; ... System.out.println(env.getProperty("bar"));
Read more...