icu.easyj.config.GlobalConfigs Maven / Gradle / Ivy
/*
* Copyright 2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package icu.easyj.config;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import icu.easyj.core.env.EnvironmentType;
import icu.easyj.core.env.RunMode;
/**
* 全局配置
*
* @author wangliang181230
* @see GlobalConfigSetter
*/
public class GlobalConfigs {
//region Fields
/**
* 项目所属区域代码
*/
private String area;
/**
* 项目所属区域名称,如:浙江省宁波市鄞州区
*/
private String areaName;
/**
* 项目代码
*/
private String project;
/**
* 项目名称
*/
private String projectName;
/**
* 应用代码
*/
private String application;
/**
* 应用名称
*/
private String applicationName;
/**
* 环境代码
*/
private String env;
/**
* 环境名称
*/
private String envName;
/**
* 环境类型
* 默认:生产环境
*/
private EnvironmentType envType = EnvironmentType.PROD;
/**
* 运行模式
* 默认:发行模式
* 用途举例:为DEBUG模式时,打印更多日志。比修改日志配置更加高效,运维成本更低。
*/
private RunMode runMode = RunMode.RELEASE;
/**
* 是否单元测试中
*/
private boolean inUnitTest = false;
/**
* 其他全局配置Map
*/
private final Map