1. 统一包名修改
This commit is contained in:
@@ -13,7 +13,7 @@ import static com.zt.plat.framework.env.core.util.EnvUtils.HOST_NAME_VALUE;
|
||||
|
||||
/**
|
||||
* 多环境的 {@link EnvEnvironmentPostProcessor} 实现类
|
||||
* 将 cloud.env.tag 设置到 nacos 等组件对应的 tag 配置项,当且仅当它们不存在时
|
||||
* 将 zt.env.tag 设置到 nacos 等组件对应的 tag 配置项,当且仅当它们不存在时
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@@ -32,7 +32,7 @@ public class EnvEnvironmentPostProcessor implements EnvironmentPostProcessor {
|
||||
environment.getSystemProperties().put(hostNameKey, EnvUtils.getHostName());
|
||||
}
|
||||
|
||||
// 1.1 如果没有 cloud.env.tag 配置项,则不进行配置项的修改
|
||||
// 1.1 如果没有 zt.env.tag 配置项,则不进行配置项的修改
|
||||
String tag = EnvUtils.getTag(environment);
|
||||
if (StrUtil.isEmpty(tag)) {
|
||||
return;
|
||||
|
||||
@@ -8,11 +8,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "cloud.env")
|
||||
@ConfigurationProperties(prefix = "zt.env")
|
||||
@Data
|
||||
public class EnvProperties {
|
||||
|
||||
public static final String TAG_KEY = "cloud.env.tag";
|
||||
public static final String TAG_KEY = "zt.env.tag";
|
||||
|
||||
/**
|
||||
* 环境标签
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@EnableConfigurationProperties(EnvProperties.class)
|
||||
public class CloudEnvRpcAutoConfiguration {
|
||||
public class ZtEnvRpcAutoConfiguration {
|
||||
|
||||
// ========== Feign 相关 ==========
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.context.annotation.Bean;
|
||||
@AutoConfiguration
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@EnableConfigurationProperties(EnvProperties.class)
|
||||
public class CloudEnvWebAutoConfiguration {
|
||||
public class ZtEnvWebAutoConfiguration {
|
||||
|
||||
/**
|
||||
* 创建 {@link EnvWebFilter} Bean
|
||||
@@ -1,2 +1,2 @@
|
||||
com.zt.plat.framework.env.config.CloudEnvWebAutoConfiguration
|
||||
com.zt.plat.framework.env.config.CloudEnvRpcAutoConfiguration
|
||||
com.zt.plat.framework.env.config.ZtEnvWebAutoConfiguration
|
||||
com.zt.plat.framework.env.config.ZtEnvRpcAutoConfiguration
|
||||
|
||||
Reference in New Issue
Block a user