class ConsulClientWrapper {

    @Value("${registry.url}")
    private String registryUrl;
    private ConsulClient consulClient;

    @PostConstruct
    void init() {<FILL_FUNCTION_BODY>}

    @PreDestroy
    void destory() {
        consulClient = null;
    }

    public ConsulClient getConsulClient() {
        return consulClient;
    }

}

        try {
            String[] arr = registryUrl.split(":");
            String host = arr[0];
            int port = Integer.parseInt(arr[1]);
            consulClient = new ConsulClient(host, port);
        } catch (Exception e) {
            throw new MotanFrameworkException("Fail to connect consul, cause: " + e.getMessage());
        }
    
<no_super_class>