Class OkHttp3AutoConfiguration


  • @Configuration
    @ConditionalOnClass(okhttp3.OkHttpClient.class)
    @EnableConfigurationProperties(OkHttpProperties.class)
    public class OkHttp3AutoConfiguration
    extends Object
    • Constructor Detail

      • OkHttp3AutoConfiguration

        public OkHttp3AutoConfiguration()
    • Method Detail

      • okHttp3Client

        @Bean
        @ConditionalOnMissingBean
        public okhttp3.OkHttpClient okHttp3Client​(@Autowired
                                                  Optional<okhttp3.Cache> cache,
                                                  @Autowired
                                                  Optional<okhttp3.CookieJar> cookieJar,
                                                  @Autowired
                                                  Optional<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 IOException
        Throws:
        IOException