Skip to content

Commit

Permalink
2.0.6.RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
sim-wangyan committed Mar 18, 2019
1 parent c29797d commit 1f00aa8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.xream.x7.reyc.Url;
import io.xream.x7.reyc.ReyClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@ReyClient(value = "127.0.0.1:8868", circuitBreaker = "", retry = true, fallback = TestFallback.class)
Expand All @@ -17,4 +18,7 @@ public interface TestServiceRemote {
@RequestMapping(value = "/xxx/reyc/test")
Boolean testFallBack(CatRO ro);

@RequestMapping(value = "/xxx/time/test", method = RequestMethod.GET)
Boolean testTimeJack();

}
2 changes: 1 addition & 1 deletion demo/src/test/java/io/xream/x7/XxxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public String value() {

public void testTime(){

String str = HttpClientUtil.getUrl("http://127.0.0.1:8868/xxx/time/test");
boolean flag = testServiceRemote.testTimeJack();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ protected static Object resolve(String remoteIntfName, String methodName, Object

List<Object> objectList = new ArrayList<>();
boolean flag = false;
for (Object arg : args){
if (arg != null && arg instanceof Url){
Url dynamicUrl = (Url)arg;
url = dynamicUrl.value();
flag = true;
}else{
objectList.add(arg);
if (args != null) {
for (Object arg : args) {
if (arg != null && arg instanceof Url) {
Url dynamicUrl = (Url) arg;
url = dynamicUrl.value();
flag = true;
} else {
objectList.add(arg);
}
}
}
if (flag) {
Expand Down

0 comments on commit 1f00aa8

Please sign in to comment.