@Bean
    public ConsulClient consulClient(final ConsulProperties consulProperties) {
        String url = consulProperties.getUrl();
        if (StringUtils.isBlank(url)) {
            throw new ShenyuException("sync.consul.url can not be null.");
        }
        try {
            URL consulUrl = new URL(url);
            return consulUrl.getPort() < 0 ? new ConsulClient(consulUrl.getHost()) : new ConsulClient(consulUrl.getHost(), consulUrl.getPort());
        } catch (MalformedURLException e) {
            throw new ShenyuException("sync.consul.url formatter is not incorrect.");
        }
    }
init Consul client.

@param consulProperties the consul properties
@return Consul client
shenyu-admin-listener/shenyu-admin-listener-consul/src/main/java/org/apache/shenyu/admin/config/ConsulSyncConfiguration.java