#35 springboot: environment variables - os

This commit is contained in:
haerong22
2023-03-15 03:48:07 +09:00
parent 01a3accd9e
commit 0a4198ba8f

View 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));
}
}