Browse Source

新增支持环境

chenyongxing 6 years ago
parent
commit
f2dc112bdc

+ 1 - 1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/enums/Env.java

@ -19,7 +19,7 @@ import com.google.common.base.Preconditions;
 * @author Jason Song(song_s@ctrip.com)
 */
public enum Env{
  LOCAL, DEV, TEST,FWS, FAT, UAT, LPT, PRO, TOOLS, UNKNOWN;
  LOCAL, DEV, TEST,FWS, FAT, UAT, LPT, PRO, TOOLS, UNKNOWN, JWDEV, JWTEST ,JWPROD;
  public static Env fromString(String env) {
    Env environment = EnvUtils.transformEnv(env);

+ 6 - 0
apollo-core/src/main/java/com/ctrip/framework/apollo/core/enums/EnvUtils.java

@ -27,6 +27,12 @@ public final class EnvUtils {
        return Env.LOCAL;
      case "TOOLS":
        return Env.TOOLS;
      case "JWDEV":
        return Env.JWDEV;
      case "JWTEST":
        return Env.JWTEST;
      case "JWPROD":
        return Env.JWPROD;
      default:
        return Env.UNKNOWN;
    }