mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
delete useless field and add additional configuration metadata
This commit is contained in:
parent
4d2de76e4b
commit
5923f41fac
@ -55,11 +55,6 @@ public class NacosConfigProperties {
|
|||||||
private static final Logger log = LoggerFactory
|
private static final Logger log = LoggerFactory
|
||||||
.getLogger(NacosConfigProperties.class);
|
.getLogger(NacosConfigProperties.class);
|
||||||
|
|
||||||
/**
|
|
||||||
* whether to enable nacos config.
|
|
||||||
*/
|
|
||||||
private boolean enabled = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nacos config server address
|
* nacos config server address
|
||||||
*/
|
*/
|
||||||
@ -140,19 +135,8 @@ public class NacosConfigProperties {
|
|||||||
|
|
||||||
private ConfigService configService;
|
private ConfigService configService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private Environment environment;
|
|
||||||
|
|
||||||
// todo sts support
|
// todo sts support
|
||||||
|
|
||||||
public boolean isEnabled() {
|
|
||||||
return enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnabled(boolean enabled) {
|
|
||||||
this.enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getServerAddr() {
|
public String getServerAddr() {
|
||||||
return serverAddr;
|
return serverAddr;
|
||||||
}
|
}
|
||||||
@ -322,16 +306,15 @@ public class NacosConfigProperties {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "NacosConfigProperties{" + "enabled=" + enabled + ", serverAddr='"
|
return "NacosConfigProperties{" + "serverAddr='" + serverAddr + '\''
|
||||||
+ serverAddr + '\'' + ", encode='" + encode + '\'' + ", group='" + group
|
+ ", encode='" + encode + '\'' + ", group='" + group + '\'' + ", prefix='"
|
||||||
+ '\'' + ", prefix='" + prefix + '\'' + ", fileExtension='"
|
+ prefix + '\'' + ", fileExtension='" + fileExtension + '\''
|
||||||
+ fileExtension + '\'' + ", timeout=" + timeout + ", endpoint='"
|
+ ", timeout=" + timeout + ", endpoint='" + endpoint + '\''
|
||||||
+ endpoint + '\'' + ", namespace='" + namespace + '\'' + ", accessKey='"
|
+ ", namespace='" + namespace + '\'' + ", accessKey='" + accessKey + '\''
|
||||||
+ accessKey + '\'' + ", secretKey='" + secretKey + '\''
|
+ ", secretKey='" + secretKey + '\'' + ", contextPath='" + contextPath
|
||||||
+ ", contextPath='" + contextPath + '\'' + ", clusterName='" + clusterName
|
+ '\'' + ", clusterName='" + clusterName + '\'' + ", name='" + name + '\''
|
||||||
+ '\'' + ", name='" + name + '\'' + ", sharedDataids='" + sharedDataids
|
+ ", sharedDataids='" + sharedDataids + '\'' + ", refreshableDataids='"
|
||||||
+ '\'' + ", refreshableDataids='" + refreshableDataids + '\''
|
+ refreshableDataids + '\'' + ", extConfig=" + extConfig + '}';
|
||||||
+ ", extConfig=" + extConfig + '}';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigService configServiceInstance() {
|
public ConfigService configServiceInstance() {
|
||||||
|
@ -32,6 +32,12 @@
|
|||||||
"name": "spring.cloud.nacos.config.ext-config",
|
"name": "spring.cloud.nacos.config.ext-config",
|
||||||
"type": "java.util.List",
|
"type": "java.util.List",
|
||||||
"description": "a set of extended configurations ."
|
"description": "a set of extended configurations ."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "spring.cloud.nacos.config.enabled",
|
||||||
|
"type": "java.lang.Boolean",
|
||||||
|
"defaultValue": true,
|
||||||
|
"description": "enable nacos config or not."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user