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
6dec4afe
Unverified
Commit
6dec4afe
authored
Mar 12, 2018
by
Ryan Baxter
Committed by
GitHub
Mar 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor Spring Retry based on changes in commons (#2771)
parent
100d158a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
84 additions
and
172 deletions
+84
-172
RibbonAutoConfiguration.java
...amework/cloud/netflix/ribbon/RibbonAutoConfiguration.java
+3
-26
RibbonLoadBalancedRetryFactory.java
.../cloud/netflix/ribbon/RibbonLoadBalancedRetryFactory.java
+18
-6
HttpClientRibbonConfiguration.java
.../netflix/ribbon/apache/HttpClientRibbonConfiguration.java
+5
-10
RetryableRibbonLoadBalancingHttpClient.java
...ribbon/apache/RetryableRibbonLoadBalancingHttpClient.java
+9
-48
OkHttpRibbonConfiguration.java
...loud/netflix/ribbon/okhttp/OkHttpRibbonConfiguration.java
+4
-8
RetryableOkHttpLoadBalancingClient.java
...lix/ribbon/okhttp/RetryableOkHttpLoadBalancingClient.java
+9
-37
RibbonLoadBalancedRetryFactoryTests.java
...d/netflix/ribbon/RibbonLoadBalancedRetryFactoryTests.java
+13
-13
SpringRetryDisabledTests.java
...mework/cloud/netflix/ribbon/SpringRetryDisabledTests.java
+3
-4
SpringRetryEnabledTests.java
...amework/cloud/netflix/ribbon/SpringRetryEnabledTests.java
+4
-3
RibbonLoadBalancingHttpClientTests.java
...lix/ribbon/apache/RibbonLoadBalancingHttpClientTests.java
+0
-0
SpringRetryDisableOkHttpClientTests.java
...ix/ribbon/okhttp/SpringRetryDisableOkHttpClientTests.java
+3
-4
SpringRetryEnabledOkHttpClientTests.java
...ix/ribbon/okhttp/SpringRetryEnabledOkHttpClientTests.java
+5
-5
RibbonRetryIntegrationTestBase.java
...filters/route/support/RibbonRetryIntegrationTestBase.java
+8
-8
No files found.
spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonAutoConfiguration.java
View file @
6dec4afe
...
...
@@ -34,9 +34,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
import
org.springframework.cloud.client.loadbalancer.AsyncLoadBalancerAutoConfiguration
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedBackOffPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryListenerFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerClient
;
import
org.springframework.cloud.client.loadbalancer.RestTemplateCustomizer
;
...
...
@@ -91,29 +89,8 @@ public class RibbonAutoConfiguration {
@Bean
@ConditionalOnClass
(
name
=
"org.springframework.retry.support.RetryTemplate"
)
@ConditionalOnMissingBean
public
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
(
SpringClientFactory
clientFactory
)
{
return
new
RibbonLoadBalancedRetryPolicyFactory
(
clientFactory
);
}
@Bean
@ConditionalOnMissingClass
(
value
=
"org.springframework.retry.support.RetryTemplate"
)
@ConditionalOnMissingBean
public
LoadBalancedRetryPolicyFactory
neverRetryPolicyFactory
()
{
return
new
LoadBalancedRetryPolicyFactory
.
NeverRetryFactory
();
}
@Bean
@ConditionalOnClass
(
name
=
"org.springframework.retry.support.RetryTemplate"
)
@ConditionalOnMissingBean
public
LoadBalancedBackOffPolicyFactory
loadBalancedBackoffPolicyFactory
()
{
return
new
LoadBalancedBackOffPolicyFactory
.
NoBackOffPolicyFactory
();
}
@Bean
@ConditionalOnClass
(
name
=
"org.springframework.retry.support.RetryTemplate"
)
@ConditionalOnMissingBean
public
LoadBalancedRetryListenerFactory
loadBalancedRetryListenerFactory
()
{
return
new
LoadBalancedRetryListenerFactory
.
DefaultRetryListenerFactory
();
public
LoadBalancedRetryFactory
loadBalancedRetryPolicyFactory
(
final
SpringClientFactory
clientFactory
)
{
return
new
RibbonLoadBalancedRetryFactory
(
clientFactory
);
}
@Bean
...
...
spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancedRetry
Policy
Factory.java
→
spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancedRetryFactory.java
View file @
6dec4afe
...
...
@@ -15,26 +15,38 @@
*/
package
org
.
springframework
.
cloud
.
netflix
.
ribbon
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.ServiceInstanceChooser
;
import
org.springframework.retry.RetryListener
;
import
org.springframework.retry.backoff.BackOffPolicy
;
/**
* @author Ryan Baxter
*/
public
class
RibbonLoadBalancedRetry
PolicyFactory
implements
LoadBalancedRetryPolic
yFactory
{
public
class
RibbonLoadBalancedRetry
Factory
implements
LoadBalancedRetr
yFactory
{
private
SpringClientFactory
clientFactory
;
public
RibbonLoadBalancedRetry
Policy
Factory
(
SpringClientFactory
clientFactory
)
{
public
RibbonLoadBalancedRetryFactory
(
SpringClientFactory
clientFactory
)
{
this
.
clientFactory
=
clientFactory
;
}
@Override
public
LoadBalancedRetryPolicy
create
(
String
serviceId
,
ServiceInstanceChooser
loadBal
anceChooser
)
{
public
LoadBalancedRetryPolicy
create
RetryPolicy
(
String
service
,
ServiceInstanceChooser
serviceInst
anceChooser
)
{
RibbonLoadBalancerContext
lbContext
=
this
.
clientFactory
.
getLoadBalancerContext
(
serviceId
);
return
new
RibbonLoadBalancedRetryPolicy
(
serviceId
,
lbContext
,
loadBalanceChooser
,
clientFactory
.
getClientConfig
(
serviceId
));
.
getLoadBalancerContext
(
service
);
return
new
RibbonLoadBalancedRetryPolicy
(
service
,
lbContext
,
serviceInstanceChooser
,
clientFactory
.
getClientConfig
(
service
));
}
@Override
public
RetryListener
[]
createRetryListeners
(
String
service
)
{
return
new
RetryListener
[
0
];
}
@Override
public
BackOffPolicy
createBackOffPolicy
(
String
service
)
{
return
null
;
}
}
spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/apache/HttpClientRibbonConfiguration.java
View file @
6dec4afe
...
...
@@ -32,9 +32,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedBackOffPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryListenerFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.commons.httpclient.ApacheHttpClientConnectionManagerFactory
;
import
org.springframework.cloud.commons.httpclient.ApacheHttpClientFactory
;
import
org.springframework.cloud.netflix.ribbon.RibbonClientName
;
...
...
@@ -133,14 +131,11 @@ public class HttpClientRibbonConfiguration {
@ConditionalOnMissingBean
(
AbstractLoadBalancerAwareClient
.
class
)
@ConditionalOnClass
(
name
=
"org.springframework.retry.support.RetryTemplate"
)
public
RetryableRibbonLoadBalancingHttpClient
retryableRibbonLoadBalancingHttpClient
(
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
ILoadBalancer
loadBalancer
,
RetryHandler
retryHandler
,
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
,
CloseableHttpClient
httpClient
,
LoadBalancedBackOffPolicyFactory
loadBalancedBackOffPolicyFactory
,
LoadBalancedRetryListenerFactory
loadBalancedRetryListenerFactory
)
{
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
ILoadBalancer
loadBalancer
,
RetryHandler
retryHandler
,
LoadBalancedRetryFactory
loadBalancedRetryFactory
,
CloseableHttpClient
httpClient
)
{
RetryableRibbonLoadBalancingHttpClient
client
=
new
RetryableRibbonLoadBalancingHttpClient
(
httpClient
,
config
,
serverIntrospector
,
loadBalancedRetryPolicyFactory
,
loadBalancedBackOffPolicyFactory
,
loadBalancedRetryListenerFactory
);
httpClient
,
config
,
serverIntrospector
,
loadBalancedRetryFactory
);
client
.
setLoadBalancer
(
loadBalancer
);
client
.
setRetryHandler
(
retryHandler
);
Monitors
.
registerObject
(
"Client_"
+
this
.
name
,
client
);
...
...
spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/apache/RetryableRibbonLoadBalancingHttpClient.java
View file @
6dec4afe
...
...
@@ -23,12 +23,10 @@ import org.apache.http.client.config.RequestConfig;
import
org.apache.http.client.methods.HttpUriRequest
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.springframework.cloud.client.ServiceInstance
;
import
org.springframework.cloud.client.loadbalancer.LoadBalanced
BackOffPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalanced
RecoveryCallback
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryContext
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetry
Listener
Factory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.RibbonRecoveryCallback
;
import
org.springframework.cloud.client.loadbalancer.ServiceInstanceChooser
;
import
org.springframework.cloud.client.loadbalancer.InterceptorRetryPolicy
;
import
org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient
;
...
...
@@ -56,50 +54,13 @@ import com.netflix.loadbalancer.Server;
*/
public
class
RetryableRibbonLoadBalancingHttpClient
extends
RibbonLoadBalancingHttpClient
implements
ServiceInstanceChooser
{
private
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
=
new
LoadBalancedRetryPolicyFactory
.
NeverRetryFactory
();
private
LoadBalancedBackOffPolicyFactory
loadBalancedBackOffPolicyFactory
=
new
LoadBalancedBackOffPolicyFactory
.
NoBackOffPolicyFactory
();
private
LoadBalancedRetryListenerFactory
loadBalancedRetryListenerFactory
=
new
LoadBalancedRetryListenerFactory
.
DefaultRetryListenerFactory
();
@Deprecated
//TODO remove in 2.0.x
public
RetryableRibbonLoadBalancingHttpClient
(
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
)
{
super
(
config
,
serverIntrospector
);
this
.
loadBalancedRetryPolicyFactory
=
loadBalancedRetryPolicyFactory
;
}
@Deprecated
//TODO remove in 2.0.x
public
RetryableRibbonLoadBalancingHttpClient
(
CloseableHttpClient
delegate
,
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
)
{
super
(
delegate
,
config
,
serverIntrospector
);
this
.
loadBalancedRetryPolicyFactory
=
loadBalancedRetryPolicyFactory
;
}
@Deprecated
//TODO remove in 2.0.x
public
RetryableRibbonLoadBalancingHttpClient
(
CloseableHttpClient
delegate
,
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
,
LoadBalancedBackOffPolicyFactory
loadBalancedBackOffPolicyFactory
)
{
super
(
delegate
,
config
,
serverIntrospector
);
this
.
loadBalancedRetryPolicyFactory
=
loadBalancedRetryPolicyFactory
;
this
.
loadBalancedBackOffPolicyFactory
=
loadBalancedBackOffPolicyFactory
;
}
private
LoadBalancedRetryFactory
loadBalancedRetryFactory
;
public
RetryableRibbonLoadBalancingHttpClient
(
CloseableHttpClient
delegate
,
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
,
LoadBalancedBackOffPolicyFactory
loadBalancedBackOffPolicyFactory
,
LoadBalancedRetryListenerFactory
loadBalancedRetryListenerFactory
)
{
LoadBalancedRetryFactory
loadBalancedRetryFactory
)
{
super
(
delegate
,
config
,
serverIntrospector
);
this
.
loadBalancedRetryPolicyFactory
=
loadBalancedRetryPolicyFactory
;
this
.
loadBalancedBackOffPolicyFactory
=
loadBalancedBackOffPolicyFactory
;
this
.
loadBalancedRetryListenerFactory
=
loadBalancedRetryListenerFactory
;
this
.
loadBalancedRetryFactory
=
loadBalancedRetryFactory
;
}
@Override
...
...
@@ -112,7 +73,7 @@ public class RetryableRibbonLoadBalancingHttpClient extends RibbonLoadBalancingH
builder
.
setRedirectsEnabled
(
ribbon
.
isFollowRedirects
(
this
.
followRedirects
));
final
RequestConfig
requestConfig
=
builder
.
build
();
final
LoadBalancedRetryPolicy
retryPolicy
=
loadBalancedRetry
PolicyFactory
.
create
(
this
.
getClientName
(),
this
);
final
LoadBalancedRetryPolicy
retryPolicy
=
loadBalancedRetry
Factory
.
createRetryPolicy
(
this
.
getClientName
(),
this
);
RetryCallback
<
RibbonApacheHttpResponse
,
IOException
>
retryCallback
=
context
->
{
//on retries the policy will choose the server and set it in the context
...
...
@@ -138,7 +99,7 @@ public class RetryableRibbonLoadBalancingHttpClient extends RibbonLoadBalancingH
}
return
new
RibbonApacheHttpResponse
(
httpResponse
,
httpUriRequest
.
getURI
());
};
RibbonRecoveryCallback
<
RibbonApacheHttpResponse
,
HttpResponse
>
recoveryCallback
=
new
Ribbon
RecoveryCallback
<
RibbonApacheHttpResponse
,
HttpResponse
>()
{
LoadBalancedRecoveryCallback
<
RibbonApacheHttpResponse
,
HttpResponse
>
recoveryCallback
=
new
LoadBalanced
RecoveryCallback
<
RibbonApacheHttpResponse
,
HttpResponse
>()
{
@Override
protected
RibbonApacheHttpResponse
createResponse
(
HttpResponse
response
,
URI
uri
)
{
return
new
RibbonApacheHttpResponse
(
response
,
uri
);
...
...
@@ -164,9 +125,9 @@ public class RetryableRibbonLoadBalancingHttpClient extends RibbonLoadBalancingH
boolean
retryable
=
isRequestRetryable
(
request
);
retryTemplate
.
setRetryPolicy
(
retryPolicy
==
null
||
!
retryable
?
new
NeverRetryPolicy
()
:
new
RetryPolicy
(
request
,
retryPolicy
,
this
,
this
.
getClientName
()));
BackOffPolicy
backOffPolicy
=
loadBalanced
BackOffPolic
yFactory
.
createBackOffPolicy
(
this
.
getClientName
());
BackOffPolicy
backOffPolicy
=
loadBalanced
Retr
yFactory
.
createBackOffPolicy
(
this
.
getClientName
());
retryTemplate
.
setBackOffPolicy
(
backOffPolicy
==
null
?
new
NoBackOffPolicy
()
:
backOffPolicy
);
RetryListener
[]
retryListeners
=
this
.
loadBalancedRetry
Listener
Factory
.
createRetryListeners
(
this
.
getClientName
());
RetryListener
[]
retryListeners
=
this
.
loadBalancedRetryFactory
.
createRetryListeners
(
this
.
getClientName
());
if
(
retryListeners
!=
null
&&
retryListeners
.
length
!=
0
)
{
retryTemplate
.
setListeners
(
retryListeners
);
}
...
...
spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/okhttp/OkHttpRibbonConfiguration.java
View file @
6dec4afe
...
...
@@ -25,9 +25,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedBackOffPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryListenerFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.commons.httpclient.OkHttpClientConnectionPoolFactory
;
import
org.springframework.cloud.commons.httpclient.OkHttpClientFactory
;
import
org.springframework.cloud.netflix.ribbon.RibbonClientName
;
...
...
@@ -101,12 +99,10 @@ public class OkHttpRibbonConfiguration {
ServerIntrospector
serverIntrospector
,
ILoadBalancer
loadBalancer
,
RetryHandler
retryHandler
,
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
,
OkHttpClient
delegate
,
LoadBalancedBackOffPolicyFactory
loadBalancedBackOffPolicyFactory
,
LoadBalancedRetryListenerFactory
loadBalancedRetryListenerFactory
)
{
LoadBalancedRetryFactory
loadBalancedRetryFactory
,
OkHttpClient
delegate
)
{
RetryableOkHttpLoadBalancingClient
client
=
new
RetryableOkHttpLoadBalancingClient
(
delegate
,
config
,
serverIntrospector
,
loadBalancedRetry
PolicyFactory
,
loadBalancedBackOffPolicyFactory
,
loadBalancedRetryListener
Factory
);
serverIntrospector
,
loadBalancedRetryFactory
);
client
.
setLoadBalancer
(
loadBalancer
);
client
.
setRetryHandler
(
retryHandler
);
Monitors
.
registerObject
(
"Client_"
+
this
.
name
,
client
);
...
...
spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/okhttp/RetryableOkHttpLoadBalancingClient.java
View file @
6dec4afe
...
...
@@ -24,12 +24,10 @@ import java.net.URI;
import
org.apache.commons.lang.BooleanUtils
;
import
org.springframework.cloud.client.ServiceInstance
;
import
org.springframework.cloud.client.loadbalancer.InterceptorRetryPolicy
;
import
org.springframework.cloud.client.loadbalancer.LoadBalanced
BackOffPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalanced
RecoveryCallback
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryContext
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetry
Listener
Factory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.RibbonRecoveryCallback
;
import
org.springframework.cloud.client.loadbalancer.ServiceInstanceChooser
;
import
org.springframework.cloud.netflix.ribbon.support.ContextAwareRequest
;
import
org.springframework.http.HttpRequest
;
...
...
@@ -56,38 +54,12 @@ import com.netflix.loadbalancer.Server;
*/
public
class
RetryableOkHttpLoadBalancingClient
extends
OkHttpLoadBalancingClient
implements
ServiceInstanceChooser
{
private
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
;
private
LoadBalancedBackOffPolicyFactory
loadBalancedBackOffPolicyFactory
=
new
LoadBalancedBackOffPolicyFactory
.
NoBackOffPolicyFactory
();
private
LoadBalancedRetryListenerFactory
loadBalancedRetryListenerFactory
=
new
LoadBalancedRetryListenerFactory
.
DefaultRetryListenerFactory
();
private
LoadBalancedRetryFactory
loadBalancedRetryFactory
;
@Deprecated
//TODO remove in 2.0.x
public
RetryableOkHttpLoadBalancingClient
(
OkHttpClient
delegate
,
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
LoadBalancedRetryPolic
yFactory
loadBalancedRetryPolicyFactory
)
{
LoadBalancedRetr
yFactory
loadBalancedRetryPolicyFactory
)
{
super
(
delegate
,
config
,
serverIntrospector
);
this
.
loadBalancedRetryPolicyFactory
=
loadBalancedRetryPolicyFactory
;
}
@Deprecated
//TODO remove in 2.0.x
public
RetryableOkHttpLoadBalancingClient
(
OkHttpClient
delegate
,
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
,
LoadBalancedBackOffPolicyFactory
loadBalancedBackOffPolicyFactory
)
{
super
(
delegate
,
config
,
serverIntrospector
);
this
.
loadBalancedRetryPolicyFactory
=
loadBalancedRetryPolicyFactory
;
this
.
loadBalancedBackOffPolicyFactory
=
loadBalancedBackOffPolicyFactory
;
}
public
RetryableOkHttpLoadBalancingClient
(
OkHttpClient
delegate
,
IClientConfig
config
,
ServerIntrospector
serverIntrospector
,
LoadBalancedRetryPolicyFactory
loadBalancedRetryPolicyFactory
,
LoadBalancedBackOffPolicyFactory
loadBalancedBackOffPolicyFactory
,
LoadBalancedRetryListenerFactory
loadBalancedRetryListenerFactory
)
{
super
(
delegate
,
config
,
serverIntrospector
);
this
.
loadBalancedRetryPolicyFactory
=
loadBalancedRetryPolicyFactory
;
this
.
loadBalancedBackOffPolicyFactory
=
loadBalancedBackOffPolicyFactory
;
this
.
loadBalancedRetryListenerFactory
=
loadBalancedRetryListenerFactory
;
this
.
loadBalancedRetryFactory
=
loadBalancedRetryPolicyFactory
;
}
@Override
...
...
@@ -104,9 +76,9 @@ public class RetryableOkHttpLoadBalancingClient extends OkHttpLoadBalancingClien
RetryCallback
<
OkHttpRibbonResponse
,
Exception
>
callback
,
RecoveryCallback
<
OkHttpRibbonResponse
>
recoveryCallback
)
throws
Exception
{
RetryTemplate
retryTemplate
=
new
RetryTemplate
();
BackOffPolicy
backOffPolicy
=
loadBalanced
BackOffPolic
yFactory
.
createBackOffPolicy
(
this
.
getClientName
());
BackOffPolicy
backOffPolicy
=
loadBalanced
Retr
yFactory
.
createBackOffPolicy
(
this
.
getClientName
());
retryTemplate
.
setBackOffPolicy
(
backOffPolicy
==
null
?
new
NoBackOffPolicy
()
:
backOffPolicy
);
RetryListener
[]
retryListeners
=
this
.
loadBalancedRetry
Listener
Factory
.
createRetryListeners
(
this
.
getClientName
());
RetryListener
[]
retryListeners
=
this
.
loadBalancedRetryFactory
.
createRetryListeners
(
this
.
getClientName
());
if
(
retryListeners
!=
null
&&
retryListeners
.
length
!=
0
)
{
retryTemplate
.
setListeners
(
retryListeners
);
}
...
...
@@ -119,7 +91,7 @@ public class RetryableOkHttpLoadBalancingClient extends OkHttpLoadBalancingClien
@Override
public
OkHttpRibbonResponse
execute
(
final
OkHttpRibbonRequest
ribbonRequest
,
final
IClientConfig
configOverride
)
throws
Exception
{
final
LoadBalancedRetryPolicy
retryPolicy
=
loadBalancedRetry
PolicyFactory
.
create
(
this
.
getClientName
(),
this
);
final
LoadBalancedRetryPolicy
retryPolicy
=
loadBalancedRetry
Factory
.
createRetryPolicy
(
this
.
getClientName
(),
this
);
RetryCallback
<
OkHttpRibbonResponse
,
Exception
>
retryCallback
=
new
RetryCallback
<
OkHttpRibbonResponse
,
Exception
>()
{
@Override
public
OkHttpRibbonResponse
doWithRetry
(
RetryContext
context
)
throws
Exception
{
...
...
@@ -154,7 +126,7 @@ public class RetryableOkHttpLoadBalancingClient extends OkHttpLoadBalancingClien
return
new
OkHttpRibbonResponse
(
response
,
newRequest
.
getUri
());
}
};
return
this
.
executeWithRetry
(
ribbonRequest
,
retryPolicy
,
retryCallback
,
new
Ribbon
RecoveryCallback
<
OkHttpRibbonResponse
,
Response
>(){
return
this
.
executeWithRetry
(
ribbonRequest
,
retryPolicy
,
retryCallback
,
new
LoadBalanced
RecoveryCallback
<
OkHttpRibbonResponse
,
Response
>(){
@Override
protected
OkHttpRibbonResponse
createResponse
(
Response
response
,
URI
uri
)
{
...
...
spring-cloud-netflix-ribbon/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancedRetry
Policy
FactoryTests.java
→
spring-cloud-netflix-ribbon/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancedRetryFactoryTests.java
View file @
6dec4afe
...
...
@@ -57,7 +57,7 @@ import static org.mockito.Mockito.verify;
/**
* @author Ryan Baxter
*/
public
class
RibbonLoadBalancedRetry
Policy
FactoryTests
{
public
class
RibbonLoadBalancedRetryFactoryTests
{
@Mock
private
SpringClientFactory
clientFactory
;
...
...
@@ -107,8 +107,8 @@ public class RibbonLoadBalancedRetryPolicyFactoryTests {
doReturn
(
config
).
when
(
clientFactory
).
getClientConfig
(
eq
(
server
.
getServiceId
()));
clientFactory
.
getLoadBalancerContext
(
server
.
getServiceId
()).
setRetryHandler
(
new
DefaultLoadBalancerRetryHandler
(
config
));
RibbonLoadBalancerClient
client
=
getRibbonLoadBalancerClient
(
server
);
RibbonLoadBalancedRetry
PolicyFactory
factory
=
new
RibbonLoadBalancedRetryPolic
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
(
server
.
getServiceId
(),
client
);
RibbonLoadBalancedRetry
Factory
factory
=
new
RibbonLoadBalancedRetr
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
RetryPolicy
(
server
.
getServiceId
(),
client
);
HttpRequest
request
=
mock
(
HttpRequest
.
class
);
doReturn
(
HttpMethod
.
GET
).
when
(
request
).
getMethod
();
LoadBalancedRetryContext
context
=
new
LoadBalancedRetryContext
(
null
,
request
);
...
...
@@ -135,8 +135,8 @@ public class RibbonLoadBalancedRetryPolicyFactoryTests {
doReturn
(
config
).
when
(
clientFactory
).
getClientConfig
(
eq
(
server
.
getServiceId
()));
clientFactory
.
getLoadBalancerContext
(
server
.
getServiceId
()).
setRetryHandler
(
new
DefaultLoadBalancerRetryHandler
(
config
));
RibbonLoadBalancerClient
client
=
getRibbonLoadBalancerClient
(
server
);
RibbonLoadBalancedRetry
PolicyFactory
factory
=
new
RibbonLoadBalancedRetryPolic
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
(
server
.
getServiceId
(),
client
);
RibbonLoadBalancedRetry
Factory
factory
=
new
RibbonLoadBalancedRetr
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
RetryPolicy
(
server
.
getServiceId
(),
client
);
HttpRequest
request
=
mock
(
HttpRequest
.
class
);
doReturn
(
HttpMethod
.
POST
).
when
(
request
).
getMethod
();
LoadBalancedRetryContext
context
=
new
LoadBalancedRetryContext
(
null
,
request
);
...
...
@@ -163,8 +163,8 @@ public class RibbonLoadBalancedRetryPolicyFactoryTests {
doReturn
(
config
).
when
(
clientFactory
).
getClientConfig
(
eq
(
server
.
getServiceId
()));
clientFactory
.
getLoadBalancerContext
(
server
.
getServiceId
()).
initWithNiwsConfig
(
config
);
RibbonLoadBalancerClient
client
=
getRibbonLoadBalancerClient
(
server
);
RibbonLoadBalancedRetry
PolicyFactory
factory
=
new
RibbonLoadBalancedRetryPolic
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
(
server
.
getServiceId
(),
client
);
RibbonLoadBalancedRetry
Factory
factory
=
new
RibbonLoadBalancedRetr
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
RetryPolicy
(
server
.
getServiceId
(),
client
);
HttpRequest
request
=
mock
(
HttpRequest
.
class
);
doReturn
(
HttpMethod
.
POST
).
when
(
request
).
getMethod
();
LoadBalancedRetryContext
context
=
new
LoadBalancedRetryContext
(
null
,
request
);
...
...
@@ -186,8 +186,8 @@ public class RibbonLoadBalancedRetryPolicyFactoryTests {
doReturn
(
""
).
when
(
config
).
getPropertyAsString
(
eq
(
RibbonLoadBalancedRetryPolicy
.
RETRYABLE_STATUS_CODES
),
eq
(
""
));
clientFactory
.
getLoadBalancerContext
(
server
.
getServiceId
()).
setRetryHandler
(
new
DefaultLoadBalancerRetryHandler
(
config
));
RibbonLoadBalancerClient
client
=
getRibbonLoadBalancerClient
(
server
);
RibbonLoadBalancedRetry
PolicyFactory
factory
=
new
RibbonLoadBalancedRetryPolic
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
(
server
.
getServiceId
(),
client
);
RibbonLoadBalancedRetry
Factory
factory
=
new
RibbonLoadBalancedRetr
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
RetryPolicy
(
server
.
getServiceId
(),
client
);
HttpRequest
request
=
mock
(
HttpRequest
.
class
);
doReturn
(
HttpMethod
.
GET
).
when
(
request
).
getMethod
();
LoadBalancedRetryContext
context
=
spy
(
new
LoadBalancedRetryContext
(
null
,
request
));
...
...
@@ -232,8 +232,8 @@ public class RibbonLoadBalancedRetryPolicyFactoryTests {
clientFactory
.
getLoadBalancerContext
(
server
.
getServiceId
()).
setRetryHandler
(
new
DefaultLoadBalancerRetryHandler
(
config
));
RibbonLoadBalancerClient
client
=
getRibbonLoadBalancerClient
(
server
);
RibbonLoadBalancedRetry
PolicyFactory
factory
=
new
RibbonLoadBalancedRetryPolic
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
(
server
.
getServiceId
(),
client
);
RibbonLoadBalancedRetry
Factory
factory
=
new
RibbonLoadBalancedRetr
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
RetryPolicy
(
server
.
getServiceId
(),
client
);
HttpRequest
request
=
mock
(
HttpRequest
.
class
);
LoadBalancedRetryContext
context
=
spy
(
new
LoadBalancedRetryContext
(
null
,
request
));
...
...
@@ -260,8 +260,8 @@ public class RibbonLoadBalancedRetryPolicyFactoryTests {
doReturn
(
"404, 418,502,foo, ,"
).
when
(
config
).
getPropertyAsString
(
eq
(
RibbonLoadBalancedRetryPolicy
.
RETRYABLE_STATUS_CODES
),
eq
(
""
));
clientFactory
.
getLoadBalancerContext
(
server
.
getServiceId
()).
setRetryHandler
(
new
DefaultLoadBalancerRetryHandler
(
config
));
RibbonLoadBalancerClient
client
=
getRibbonLoadBalancerClient
(
server
);
RibbonLoadBalancedRetry
PolicyFactory
factory
=
new
RibbonLoadBalancedRetryPolic
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
(
server
.
getServiceId
(),
client
);
RibbonLoadBalancedRetry
Factory
factory
=
new
RibbonLoadBalancedRetr
yFactory
(
clientFactory
);
LoadBalancedRetryPolicy
policy
=
factory
.
create
RetryPolicy
(
server
.
getServiceId
(),
client
);
HttpRequest
request
=
mock
(
HttpRequest
.
class
);
doReturn
(
HttpMethod
.
GET
).
when
(
request
).
getMethod
();
assertThat
(
policy
.
retryableStatusCode
(
400
),
is
(
false
));
...
...
spring-cloud-netflix-ribbon/src/test/java/org/springframework/cloud/netflix/ribbon/SpringRetryDisabledTests.java
View file @
6dec4afe
...
...
@@ -23,7 +23,7 @@ import org.junit.Test;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.autoconfigure.AutoConfigurations
;
import
org.springframework.boot.test.context.runner.ApplicationContextRunner
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetry
Policy
Factory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration
;
import
org.springframework.cloud.netflix.ribbon.apache.RibbonLoadBalancingHttpClient
;
import
org.springframework.cloud.test.ClassPathExclusions
;
...
...
@@ -48,9 +48,8 @@ public class SpringRetryDisabledTests {
LoadBalancerAutoConfiguration
.
class
,
RibbonClientConfiguration
.
class
))
.
run
(
context
->
{
Map
<
String
,
LoadBalancedRetryPolicyFactory
>
factories
=
context
.
getBeansOfType
(
LoadBalancedRetryPolicyFactory
.
class
);
assertThat
(
factories
.
values
(),
hasSize
(
1
));
assertThat
(
factories
.
values
().
toArray
()[
0
],
instanceOf
(
LoadBalancedRetryPolicyFactory
.
NeverRetryFactory
.
class
));
Map
<
String
,
LoadBalancedRetryFactory
>
factories
=
context
.
getBeansOfType
(
LoadBalancedRetryFactory
.
class
);
assertThat
(
factories
.
values
(),
hasSize
(
0
));
Map
<
String
,
RibbonLoadBalancingHttpClient
>
clients
=
context
.
getBeansOfType
(
RibbonLoadBalancingHttpClient
.
class
);
assertThat
(
clients
.
values
(),
hasSize
(
1
));
assertThat
(
clients
.
values
().
toArray
()[
0
],
instanceOf
(
RibbonLoadBalancingHttpClient
.
class
));
...
...
spring-cloud-netflix-ribbon/src/test/java/org/springframework/cloud/netflix/ribbon/SpringRetryEnabledTests.java
View file @
6dec4afe
...
...
@@ -22,7 +22,8 @@ import java.util.Map;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.BeansException
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration
;
import
org.springframework.cloud.commons.httpclient.HttpClientConfiguration
;
import
org.springframework.cloud.netflix.ribbon.apache.RetryableRibbonLoadBalancingHttpClient
;
...
...
@@ -48,9 +49,9 @@ public class SpringRetryEnabledTests implements ApplicationContextAware {
@Test
public
void
testLoadBalancedRetryFactoryBean
()
throws
Exception
{
Map
<
String
,
LoadBalancedRetry
PolicyFactory
>
factories
=
context
.
getBeansOfType
(
LoadBalancedRetryPolic
yFactory
.
class
);
Map
<
String
,
LoadBalancedRetry
Factory
>
factories
=
context
.
getBeansOfType
(
LoadBalancedRetr
yFactory
.
class
);
assertThat
(
factories
.
values
(),
hasSize
(
1
));
assertThat
(
factories
.
values
().
toArray
()[
0
],
instanceOf
(
RibbonLoadBalancedRetry
Policy
Factory
.
class
));
assertThat
(
factories
.
values
().
toArray
()[
0
],
instanceOf
(
RibbonLoadBalancedRetryFactory
.
class
));
Map
<
String
,
RibbonLoadBalancingHttpClient
>
clients
=
context
.
getBeansOfType
(
RibbonLoadBalancingHttpClient
.
class
);
assertThat
(
clients
.
values
(),
hasSize
(
1
));
assertThat
(
clients
.
values
().
toArray
()[
0
],
instanceOf
(
RetryableRibbonLoadBalancingHttpClient
.
class
));
...
...
spring-cloud-netflix-ribbon/src/test/java/org/springframework/cloud/netflix/ribbon/apache/RibbonLoadBalancingHttpClientTests.java
View file @
6dec4afe
This diff is collapsed.
Click to expand it.
spring-cloud-netflix-ribbon/src/test/java/org/springframework/cloud/netflix/ribbon/okhttp/SpringRetryDisableOkHttpClientTests.java
View file @
6dec4afe
...
...
@@ -22,7 +22,7 @@ import org.junit.Test;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.autoconfigure.AutoConfigurations
;
import
org.springframework.boot.test.context.runner.ApplicationContextRunner
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetry
Policy
Factory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration
;
import
org.springframework.cloud.commons.httpclient.HttpClientConfiguration
;
import
org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration
;
...
...
@@ -52,9 +52,8 @@ public class SpringRetryDisableOkHttpClientTests {
.
withUserConfiguration
(
OkHttpLoadBalancingClientTests
.
OkHttpClientConfiguration
.
class
)
.
run
(
context
->
{
Map
<
String
,
LoadBalancedRetryPolicyFactory
>
factories
=
context
.
getBeansOfType
(
LoadBalancedRetryPolicyFactory
.
class
);
assertThat
(
factories
.
values
(),
hasSize
(
1
));
assertThat
(
factories
.
values
().
toArray
()[
0
],
instanceOf
(
LoadBalancedRetryPolicyFactory
.
NeverRetryFactory
.
class
));
Map
<
String
,
LoadBalancedRetryFactory
>
factories
=
context
.
getBeansOfType
(
LoadBalancedRetryFactory
.
class
);
assertThat
(
factories
.
values
(),
hasSize
(
0
));
Map
<
String
,
OkHttpLoadBalancingClient
>
clients
=
context
.
getBeansOfType
(
OkHttpLoadBalancingClient
.
class
);
assertThat
(
clients
.
values
(),
hasSize
(
1
));
assertThat
(
clients
.
values
().
toArray
()[
0
],
instanceOf
(
OkHttpLoadBalancingClient
.
class
));
...
...
spring-cloud-netflix-ribbon/src/test/java/org/springframework/cloud/netflix/ribbon/okhttp/SpringRetryEnabledOkHttpClientTests.java
View file @
6dec4afe
...
...
@@ -20,12 +20,12 @@ import org.junit.Test;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.BeansException
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetry
Policy
Factory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration
;
import
org.springframework.cloud.commons.httpclient.HttpClientConfiguration
;
import
org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration
;
import
org.springframework.cloud.netflix.ribbon.RibbonClientConfiguration
;
import
org.springframework.cloud.netflix.ribbon.RibbonLoadBalancedRetry
Policy
Factory
;
import
org.springframework.cloud.netflix.ribbon.RibbonLoadBalancedRetryFactory
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.test.context.ContextConfiguration
;
...
...
@@ -49,11 +49,11 @@ public class SpringRetryEnabledOkHttpClientTests implements ApplicationContextAw
@Test
public
void
testLoadBalancedRetryFactoryBean
()
throws
Exception
{
Map
<
String
,
LoadBalancedRetry
Policy
Factory
>
factories
=
context
.
getBeansOfType
(
LoadBalancedRetry
Policy
Factory
.
class
);
Map
<
String
,
LoadBalancedRetryFactory
>
factories
=
context
.
getBeansOfType
(
LoadBalancedRetryFactory
.
class
);
assertThat
(
factories
.
values
(),
hasSize
(
1
));
assertThat
(
factories
.
values
().
toArray
()[
0
],
instanceOf
(
RibbonLoadBalancedRetry
Policy
Factory
.
class
));
instanceOf
(
RibbonLoadBalancedRetryFactory
.
class
));
Map
<
String
,
OkHttpLoadBalancingClient
>
clients
=
context
.
getBeansOfType
(
OkHttpLoadBalancingClient
.
class
);
assertThat
(
clients
.
values
(),
hasSize
(
1
));
...
...
spring-cloud-netflix-zuul/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/support/RibbonRetryIntegrationTestBase.java
View file @
6dec4afe
...
...
@@ -30,13 +30,13 @@ import org.junit.Test;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.test.web.client.TestRestTemplate
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory
;
import
org.springframework.cloud.client.loadbalancer.ServiceInstanceChooser
;
import
org.springframework.cloud.netflix.ribbon.RibbonClient
;
import
org.springframework.cloud.netflix.ribbon.RibbonClients
;
import
org.springframework.cloud.netflix.ribbon.RibbonLoadBalancedRetryPolicy
;
import
org.springframework.cloud.netflix.ribbon.RibbonLoadBalancedRetry
Policy
Factory
;
import
org.springframework.cloud.netflix.ribbon.RibbonLoadBalancedRetryFactory
;
import
org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerContext
;
import
org.springframework.cloud.netflix.ribbon.SpringClientFactory
;
import
org.springframework.cloud.netflix.ribbon.StaticServerList
;
...
...
@@ -210,23 +210,23 @@ public abstract class RibbonRetryIntegrationTestBase {
extends
RibbonClientConfiguration
{
@Bean
public
LoadBalancedRetry
Policy
Factory
loadBalancedRetryPolicyFactory
(
public
LoadBalancedRetryFactory
loadBalancedRetryPolicyFactory
(
SpringClientFactory
factory
)
{
return
new
MyRibbonRetry
Policy
Factory
(
factory
);
return
new
MyRibbonRetryFactory
(
factory
);
}
public
static
class
MyRibbonRetry
Policy
Factory
extends
RibbonLoadBalancedRetry
Policy
Factory
{
public
static
class
MyRibbonRetryFactory
extends
RibbonLoadBalancedRetryFactory
{
private
SpringClientFactory
factory
;
public
MyRibbonRetry
Policy
Factory
(
SpringClientFactory
clientFactory
)
{
public
MyRibbonRetryFactory
(
SpringClientFactory
clientFactory
)
{
super
(
clientFactory
);
this
.
factory
=
clientFactory
;
}
@Override
public
LoadBalancedRetryPolicy
create
(
String
serviceId
,
public
LoadBalancedRetryPolicy
create
RetryPolicy
(
String
serviceId
,
ServiceInstanceChooser
loadBalanceChooser
)
{
RibbonLoadBalancerContext
lbContext
=
this
.
factory
.
getLoadBalancerContext
(
serviceId
);
...
...
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