class ConsulAutoConfiguration {
    @Autowired
    private Environment environment;

    @Bean
    public ConsulOperation consulOperation() {
        return new ConsulOperation();
    }

    @Bean
    @ConditionalOnMissingBean
    public ConsulClient consulClient() {<FILL_FUNCTION_BODY>}
}

        String consulHost = environment.getProperty(ConsulConstant.CONSUL_HOST);
        if (StringUtils.isBlank(consulHost)) {
            throw new DiscoveryException(ConsulConstant.CONSUL_HOST + " can't be null or empty");
        }

        int consulPort = environment.getProperty(ConsulConstant.CONSUL_PORT, Integer.class);

        return new ConsulClient(consulHost, consulPort);
    
<no_super_class>