Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
4e155f4c
Unverified
Commit
4e155f4c
authored
May 02, 2018
by
Ryan Baxter
Committed by
GitHub
May 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use condition on type string instead of class
Avoid problems if OKHTTP is not on the classpath. Fixes #2797
parent
520d1263
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
FeignAcceptGzipEncodingAutoConfiguration.java
...gn/encoding/FeignAcceptGzipEncodingAutoConfiguration.java
+1
-2
FeignContentGzipEncodingAutoConfiguration.java
...n/encoding/FeignContentGzipEncodingAutoConfiguration.java
+1
-2
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/FeignAcceptGzipEncodingAutoConfiguration.java
View file @
4e155f4c
...
...
@@ -18,7 +18,6 @@ package org.springframework.cloud.netflix.feign.encoding;
import
feign.Client
;
import
feign.Feign
;
import
okhttp3.OkHttpClient
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
...
...
@@ -43,7 +42,7 @@ import org.springframework.context.annotation.Configuration;
@ConditionalOnProperty
(
value
=
"feign.compression.response.enabled"
,
matchIfMissing
=
false
)
//The OK HTTP client uses "transparent" compression.
//If the accept-encoding header is present it disable transparent compression
@ConditionalOnMissingBean
(
OkHttpClient
.
class
)
@ConditionalOnMissingBean
(
type
=
"okhttp3.OkHttpClient"
)
@AutoConfigureAfter
(
FeignAutoConfiguration
.
class
)
public
class
FeignAcceptGzipEncodingAutoConfiguration
{
...
...
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/FeignContentGzipEncodingAutoConfiguration.java
View file @
4e155f4c
...
...
@@ -18,7 +18,6 @@ package org.springframework.cloud.netflix.feign.encoding;
import
feign.Client
;
import
feign.Feign
;
import
okhttp3.OkHttpClient
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
...
...
@@ -42,7 +41,7 @@ import org.springframework.context.annotation.Configuration;
@ConditionalOnBean
(
Client
.
class
)
//The OK HTTP client uses "transparent" compression.
//If the content-encoding header is present it disable transparent compression
@ConditionalOnMissingBean
(
OkHttpClient
.
class
)
@ConditionalOnMissingBean
(
type
=
"okhttp3.OkHttpClient"
)
@ConditionalOnProperty
(
value
=
"feign.compression.request.enabled"
,
matchIfMissing
=
false
)
@AutoConfigureAfter
(
FeignAutoConfiguration
.
class
)
public
class
FeignContentGzipEncodingAutoConfiguration
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment