提交 2765be72 编写于 作者: G guide

[refractor]rename -> RpcConfigEnum

上级 02fd7372
package github.javaguide.enums;
public enum RpcConfigPropertiesEnum {
public enum RpcConfigEnum {
RPC_CONFIG_PATH("rpc.properties"),
ZK_ADDRESS("rpc.zookeeper.address");
......@@ -8,7 +8,7 @@ public enum RpcConfigPropertiesEnum {
private final String propertyValue;
RpcConfigPropertiesEnum(String propertyValue) {
RpcConfigEnum(String propertyValue) {
this.propertyValue = propertyValue;
}
......
package github.javaguide.registry.zk.util;
import github.javaguide.enums.RpcConfigPropertiesEnum;
import github.javaguide.enums.RpcConfigEnum;
import github.javaguide.exception.RpcException;
import github.javaguide.utils.file.PropertiesFileUtils;
import lombok.extern.slf4j.Slf4j;
......@@ -97,9 +97,9 @@ public final class CuratorUtils {
public static CuratorFramework getZkClient() {
// check if user has set zk address
Properties properties = PropertiesFileUtils.readPropertiesFile(RpcConfigPropertiesEnum.RPC_CONFIG_PATH.getPropertyValue());
Properties properties = PropertiesFileUtils.readPropertiesFile(RpcConfigEnum.RPC_CONFIG_PATH.getPropertyValue());
if (properties != null) {
defaultZookeeperAddress = properties.getProperty(RpcConfigPropertiesEnum.ZK_ADDRESS.getPropertyValue());
defaultZookeeperAddress = properties.getProperty(RpcConfigEnum.ZK_ADDRESS.getPropertyValue());
}
// if zkClient has been started, return directly
if (zkClient != null && zkClient.getState() == CuratorFrameworkState.STARTED) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册