#35 springboot: environment variables - os
This commit is contained in:
14
springboot/external/src/test/java/hello/external/OsEnv.java
vendored
Normal file
14
springboot/external/src/test/java/hello/external/OsEnv.java
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package hello.external;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class OsEnv {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Map<String, String> envMap = System.getenv();
|
||||
envMap.forEach((k, v) -> log.info("env {}={}", k, v));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user