Commit 480f1359 by zhouhaibao

java配置添加

1 parent 8465d5cf
......@@ -15,7 +15,7 @@ public class ConfigUtils {
private static final String CONFIG_FILE_PATTERN = "config-%s.properties";
static {
String environment = System.getenv("ENVIRONMENT"); // 或者 System.getProperty("ENVIRONMENT")
String environment = System.getProperty("ENVIRONMENT"); // 或者 System.getProperty("ENVIRONMENT")
String configFile = String.format(CONFIG_FILE_PATTERN, environment != null ? environment : "dev");
try (InputStream input = ConfigUtils.class.getClassLoader().getResourceAsStream(configFile)) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!