Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #3688 config-center-config #3853

Merged
merged 2 commits into from
Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void setAddress(String address) {
this.address = address;
}

@Parameter(key = Constants.CONFIG_CLUSTER_KEY)
@Parameter(key = Constants.CONFIG_CLUSTER_KEY, useKeyAsProperty = false)
public String getCluster() {
return cluster;
}
Expand All @@ -104,7 +104,7 @@ public void setCluster(String cluster) {
this.cluster = cluster;
}

@Parameter(key = Constants.CONFIG_NAMESPACE_KEY)
@Parameter(key = Constants.CONFIG_NAMESPACE_KEY, useKeyAsProperty = false)
public String getNamespace() {
return namespace;
}
Expand All @@ -113,7 +113,7 @@ public void setNamespace(String namespace) {
this.namespace = namespace;
}

@Parameter(key = Constants.CONFIG_GROUP_KEY)
@Parameter(key = Constants.CONFIG_GROUP_KEY, useKeyAsProperty = false)
public String getGroup() {
return group;
}
Expand All @@ -122,7 +122,7 @@ public void setGroup(String group) {
this.group = group;
}

@Parameter(key = Constants.CONFIG_CHECK_KEY)
@Parameter(key = Constants.CONFIG_CHECK_KEY, useKeyAsProperty = false)
public Boolean isCheck() {
return check;
}
Expand All @@ -131,7 +131,7 @@ public void setCheck(Boolean check) {
this.check = check;
}

@Parameter(key = Constants.CONFIG_ENABLE_KEY)
@Parameter(key = Constants.CONFIG_ENABLE_KEY, useKeyAsProperty = false)
public Boolean isHighestPriority() {
return highestPriority;
}
Expand All @@ -156,7 +156,7 @@ public void setPassword(String password) {
this.password = password;
}

@Parameter(key = Constants.CONFIG_TIMEOUT_KEY)
@Parameter(key = Constants.CONFIG_TIMEOUT_KEY, useKeyAsProperty = false)
public Long getTimeout() {
return timeout;
}
Expand All @@ -165,7 +165,7 @@ public void setTimeout(Long timeout) {
this.timeout = timeout;
}

@Parameter(key = Constants.CONFIG_CONFIGFILE_KEY)
@Parameter(key = Constants.CONFIG_CONFIGFILE_KEY, useKeyAsProperty = false)
public String getConfigFile() {
return configFile;
}
Expand All @@ -183,7 +183,7 @@ public void setAppConfigFile(String appConfigFile) {
this.appConfigFile = appConfigFile;
}

@Parameter(key = Constants.CONFIG_APPNAME_KEY)
@Parameter(key = Constants.CONFIG_APPNAME_KEY, useKeyAsProperty = false)
public String getAppName() {
return appName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@

boolean append() default false;

/**
* if {@link #key()} is specified, it will be used as the key for the annotated property when generating url.
* by default, this key will also be used to retrieve the config value:
* <pre>
* {@code
* class ExampleConfig {
* // Dubbo will try to get "dubbo.example.alias_for_item=xxx" from .properties, if you want to use the original property
* // "dubbo.example.item=xxx", you need to set useKeyAsProperty=false.
* @Parameter(key = "alias_for_item")
* public getItem();
* }
* }
*
* </pre>
*/
boolean useKeyAsProperty() default true;

}