shenyu-spring-boot-starter/shenyu-spring-boot-starter-sync-data-center/shenyu-spring-boot-starter-sync-data-http/src/main/java/org/apache/shenyu/springboot/starter/sync/data/http/HttpSyncDataConfiguration.java
/**
     * Rest template.
     *
     * @param httpConfig the http config
     * @return the rest template
     */
Rest template.
@param httpConfig the http config
@return the rest template
Rest template . @param httpConfig the http config @return the rest template
@Bean
    public RestTemplate restTemplate(final HttpConfig httpConfig) {
        OkHttp3ClientHttpRequestFactory factory = new OkHttp3ClientHttpRequestFactory();
        factory.setConnectTimeout(Objects.isNull(httpConfig.getConnectionTimeout()) ? (int) HttpConstants.CLIENT_POLLING_CONNECT_TIMEOUT : httpConfig.getConnectionTimeout());
        factory.setReadTimeout(Objects.isNull(httpConfig.getReadTimeout()) ? (int) HttpConstants.CLIENT_POLLING_READ_TIMEOUT : httpConfig.getReadTimeout());
        factory.setWriteTimeout(Objects.isNull(httpConfig.getWriteTimeout()) ? (int) HttpConstants.CLIENT_POLLING_WRITE_TIMEOUT : httpConfig.getWriteTimeout());
        return new RestTemplate(factory);
    }
@ Bean public RestTemplate restTemplate ( final HttpConfig httpConfig ) { OkHttp3ClientHttpRequestFactory factory = new OkHttp3ClientHttpRequestFactory ( ) ; factory . setConnectTimeout ( Objects . isNull ( httpConfig . getConnectionTimeout ( ) ) ? ( int ) HttpConstants . CLIENT_POLLING_CONNECT_TIMEOUT : httpConfig . getConnectionTimeout ( ) ) ; factory . setReadTimeout ( Objects . isNull ( httpConfig . getReadTimeout ( ) ) ? ( int ) HttpConstants . CLIENT_POLLING_READ_TIMEOUT : httpConfig . getReadTimeout ( ) ) ; factory . setWriteTimeout ( Objects . isNull ( httpConfig . getWriteTimeout ( ) ) ? ( int ) HttpConstants . CLIENT_POLLING_WRITE_TIMEOUT : httpConfig . getWriteTimeout ( ) ) ; return new RestTemplate ( factory ) ; }
Rest template.
Rest template .