@Override
    public String getPort() {
        final String port = super.getPort();
        return getContext().getBeansOfType(ServiceBean.class).entrySet()
                .stream().findFirst().map(entry -> {
                    final ServiceBean<?> serviceBean = entry.getValue();
                    return StringUtils.isBlank(port) || "-1".equals(port)
                            ? String.valueOf(serviceBean.getProtocol().getPort()) : port;
                }).orElse(port);
    }
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