private String buildRpcExt(final ServiceBean<?> serviceBean, final String methodName) {
        DubboRpcExt build = DubboRpcExt.builder()
                .protocol(StringUtils.isNotEmpty(serviceBean.getProtocol().getName()) ? serviceBean.getProtocol().getName() : "")
                .group(StringUtils.isNotEmpty(serviceBean.getGroup()) ? serviceBean.getGroup() : "")
                .version(StringUtils.isNotEmpty(serviceBean.getVersion()) ? serviceBean.getVersion() : "")
                .loadbalance(StringUtils.isNotEmpty(serviceBean.getLoadbalance()) ? serviceBean.getLoadbalance() : CommonConstants.DEFAULT_LOADBALANCE)
                .retries(Optional.ofNullable(serviceBean.getRetries()).orElse(CommonConstants.DEFAULT_RETRIES))
                .timeout(Optional.ofNullable(serviceBean.getTimeout()).orElse(DEFAULT_CONNECT_TIMEOUT))
                .sent(Optional.ofNullable(serviceBean.getSent()).orElse(Boolean.FALSE))
                .cluster(StringUtils.isNotEmpty(serviceBean.getCluster()) ? serviceBean.getCluster() : Constants.DEFAULT_CLUSTER)
                .url("")
                .serialization(serviceBean.getSerialization())
                .build();
        // method config: loadbalance,retries,timeout,sent
        if (Objects.nonNull(serviceBean.getMethods())) {
            build.setMethods(new ArrayList<>());
            for (MethodConfig methodConfig : serviceBean.getMethods()) {
                DubboRpcMethodExt methodExt = new DubboRpcMethodExt();
                methodExt.setName(methodConfig.getName());
                methodExt.setLoadbalance(methodConfig.getLoadbalance());
                methodExt.setRetries(methodConfig.getRetries());
                methodExt.setTimeout(methodConfig.getTimeout());
                methodExt.setSent(methodConfig.getSent());
                build.getMethods().add(methodExt);
            }
        }
        return GsonUtils.getInstance().toJson(build);
    }
Instantiates a new context refreshed event listener.

@param clientConfig                   the shenyu dubbo client config
@param shenyuClientRegisterRepository the shenyuClientRegisterRepository
shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java