class RestfulConnector {

        private List<URI> endpoints = new ArrayList<>(Collections.singletonList(URI.create("http://localhost:6041/")));

        private String username = "root";

        private String password = "taosdata";

        private int maxConnections = Runtime.getRuntime().availableProcessors() * 8;

        private Duration pendingAcquireTimeout = Duration.ofSeconds(10);
        private Duration evictInBackground = Duration.ofSeconds(60);

        private Duration connectionTimeout = Duration.ofSeconds(5);

        private Duration socketTimeout = Duration.ofSeconds(5);

        private DataSize maxInMemorySize = DataSize.ofMegabytes(10);

        public URI selectURI() {
            // TODO: 2021/6/2 更好的负载均衡方式
            return endpoints.get(ThreadLocalRandom.current().nextInt(endpoints.size()));
        }

        public WebClient createClient() {<FILL_FUNCTION_BODY>}
    }

            WebClient.Builder builder = WebClient.builder();
            URI endpoint = endpoints.get(0);

            if (endpoints.size() > 1) {
                builder = builder.filter((request, next) -> {
                    URI target = selectURI();
                    if (target.equals(endpoint)) {
                        return next.exchange(request);
                    }
                    URI uri = UriComponentsBuilder
                        .fromUri(request.url())
                        .host(target.getHost())
                        .port(target.getPort())
                        .build()
                        .toUri();
                    return next
                        .exchange(ClientRequest
                                      .from(request)
                                      .url(uri)
                                      .build());
                });
            }

            return builder
                .codecs(clientCodecConfigurer -> clientCodecConfigurer
                    .defaultCodecs()
                    .maxInMemorySize((int) maxInMemorySize.toBytes()))
                .defaultHeaders(headers -> {
                    if (StringUtils.hasText(username)) {
                        headers.setBasicAuth(username, password);
                    }
                })
                .baseUrl(endpoint.toString())
                .build();
        
<no_super_class>