mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Add default values for some configuration items
This commit is contained in:
@@ -54,11 +54,7 @@ public class NacosDataSourceProperties extends AbstractDataSourceProperties {
|
||||
public void preCheck(String dataSourceName) {
|
||||
if (StringUtils.isEmpty(serverAddr)) {
|
||||
serverAddr = this.getEnv().getProperty(
|
||||
"spring.cloud.sentinel.datasource.nacos.server-addr", "");
|
||||
if (StringUtils.isEmpty(serverAddr)) {
|
||||
throw new IllegalArgumentException(
|
||||
"NacosDataSource server-addr is empty");
|
||||
}
|
||||
"spring.cloud.sentinel.datasource.nacos.server-addr", "localhost:8848");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user