Merge pull request #2355 from ZShUn/dev-1.2.0

1.NacosProperties注解添加username password参数
This commit is contained in:
liaochuntao 2020-02-11 12:22:35 +08:00 committed by GitHub
commit de836a6e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,6 +96,17 @@ public @interface NacosProperties {
*/
String ENABLE_REMOTE_SYNC_CONFIG = "enableRemoteSyncConfig";
/**
* The property name of "username"
*/
String USERNAME = "username";
/**
* The property name of "password"
*/
String PASSWORD = "password";
/**
* The placeholder of endpoint, the value is <code>"${nacos.endpoint:}"</code>
*/
@ -156,6 +167,16 @@ public @interface NacosProperties {
*/
String ENABLE_REMOTE_SYNC_CONFIG_PLACEHOLDER = "${" + PREFIX + ENABLE_REMOTE_SYNC_CONFIG + ":}";
/**
* The placeholder of endpoint, the value is <code>"${nacos.username:}"</code>
*/
String USERNAME_PLACEHOLDER = "${" + PREFIX + USERNAME + ":}";
/**
* The placeholder of endpoint, the value is <code>"${nacos.password:}"</code>
*/
String PASSWORD_PLACEHOLDER = "${" + PREFIX + PASSWORD + ":}";
/**
* The property of "endpoint"
*
@ -252,4 +273,20 @@ public @interface NacosProperties {
*/
String enableRemoteSyncConfig() default ENABLE_REMOTE_SYNC_CONFIG_PLACEHOLDER;
/**
* The property of "username"
*
* @return empty as default value
* @see #USERNAME_PLACEHOLDER
*/
String username() default USERNAME_PLACEHOLDER;
/**
* The property of "password"
*
* @return empty as default value
* @see #PASSWORD_PLACEHOLDER
*/
String password() default PASSWORD_PLACEHOLDER;
}