public enum DeployEnvEnum extends Enum<DeployEnvEnum>
MyossConstants.DEPLOY_ENV| Enum Constant and Description |
|---|
CUSTOMIZE_DEV
自定义本地开发环境: 运行在办公室开发者的电脑中
|
DEV
开发环境
|
LOCAL
本地开发环境: 运行在办公室开发者的电脑中
|
PRD
生产环境
|
PRE
预发环境
|
TEST
开发环境
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getDeployEnv()
获取应用部署的环境变量
|
static DeployEnvEnum |
getDeployEnvEnum()
获取应用部署的环境变量
|
static DeployEnvEnum |
getEnumByValue(String value)
根据环境变量的值获取枚举
|
static boolean |
isCustomizeDev()
是否为自定义开发环境, 实际业务场景中: 不是用 dev 代表开发环境
|
static boolean |
isDev()
是否为开发环境: DEPLOY_ENV=dev
|
static boolean |
isDev(String value)
是否为开发环境: DEPLOY_ENV=dev
|
static boolean |
isDevOrTest()
是否为开发环境或者测试环境: dev or test
|
static boolean |
isDevOrTest(String value)
是否为开发环境或者测试环境: dev or test
|
static boolean |
isLocal()
是否为开发环境: DEPLOY_ENV=local
|
static boolean |
isLocal(String value)
是否为本地开发环境: DEPLOY_ENV=local
|
static boolean |
isPrd()
是否为生产环境: DEPLOY_ENV=prd
|
static boolean |
isPrd(String value)
是否为生产环境: DEPLOY_ENV=prd
|
static boolean |
isPre()
是否为预发环境: DEPLOY_ENV==pre
|
static boolean |
isPre(String value)
是否为预发环境: DEPLOY_ENV=pre
|
static boolean |
isTest()
是否为测试环境: DEPLOY_ENV=test
|
static boolean |
isTest(String value)
是否为测试环境: DEPLOY_ENV=test
|
static void |
setDeployEnv(String deployEnv)
设置应用部署的环境变量
|
static DeployEnvEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DeployEnvEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DeployEnvEnum CUSTOMIZE_DEV
public static final DeployEnvEnum LOCAL
public static final DeployEnvEnum DEV
public static final DeployEnvEnum TEST
public static final DeployEnvEnum PRE
public static final DeployEnvEnum PRD
public static DeployEnvEnum[] values()
for (DeployEnvEnum c : DeployEnvEnum.values()) System.out.println(c);
public static DeployEnvEnum valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static DeployEnvEnum getEnumByValue(String value)
value - 环境变量的值public static boolean isCustomizeDev()
请参考文档进行设置public static boolean isLocal(String value)
value - 部署的环境变量public static boolean isLocal()
public static boolean isDevOrTest(String value)
value - 部署的环境变量public static boolean isDevOrTest()
public static boolean isDev(String value)
value - 部署的环境变量public static boolean isDev()
public static boolean isTest(String value)
value - 部署的环境变量public static boolean isTest()
public static boolean isPre(String value)
value - 部署的环境变量public static boolean isPre()
public static boolean isPrd(String value)
value - 部署的环境变量public static boolean isPrd()
public static String getDeployEnv()
public static DeployEnvEnum getDeployEnvEnum()
getDeployEnv()public static void setDeployEnv(String deployEnv)
deployEnv - 部署的环境变量Copyright © 2018–2021. All rights reserved.