Class OkHttp3AutoConfiguration


  • @Configuration(proxyBeanMethods=false)
    @ConditionalOnClass(okhttp3.OkHttpClient.class)
    @EnableConfigurationProperties(OkHttpProperties.class)
    public class OkHttp3AutoConfiguration
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      okhttp3.Cache okHttp3Cache()  
      okhttp3.OkHttpClient okHttp3Client​(org.springframework.beans.factory.ObjectProvider<okhttp3.Cache> cache, org.springframework.beans.factory.ObjectProvider<okhttp3.CookieJar> cookieJar, org.springframework.beans.factory.ObjectProvider<okhttp3.Dns> dns, okhttp3.ConnectionPool connectionPool)  
      okhttp3.ConnectionPool okHttp3ConnectionPool()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OkHttp3AutoConfiguration

        public OkHttp3AutoConfiguration()
    • Method Detail

      • okHttp3Client

        @Bean
        @ConditionalOnMissingBean
        public okhttp3.OkHttpClient okHttp3Client​(org.springframework.beans.factory.ObjectProvider<okhttp3.Cache> cache,
                                                  org.springframework.beans.factory.ObjectProvider<okhttp3.CookieJar> cookieJar,
                                                  org.springframework.beans.factory.ObjectProvider<okhttp3.Dns> dns,
                                                  okhttp3.ConnectionPool connectionPool)
      • okHttp3ConnectionPool

        @Bean
        @ConditionalOnMissingBean
        public okhttp3.ConnectionPool okHttp3ConnectionPool()
      • okHttp3Cache

        @Bean
        @ConditionalOnMissingBean
        @ConditionalOnProperty(value="okhttp.cache.enabled",
                               havingValue="true",
                               matchIfMissing=true)
        public okhttp3.Cache okHttp3Cache()
                                   throws java.io.IOException
        Throws:
        java.io.IOException