Commit c0bfce92 by Nepxion

重构类结构

parent 447da0dd
...@@ -10,12 +10,11 @@ package com.nepxion.discovery.plugin.example.feign; ...@@ -10,12 +10,11 @@ package com.nepxion.discovery.plugin.example.feign;
*/ */
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
@FeignClient(value = "discovery-springcloud-example-a") @FeignClient(value = "discovery-springcloud-example-a")
public interface AFeign { public interface AFeign {
@RequestMapping(path = "/invoke", method = RequestMethod.POST) @RequestMapping(path = "/invoke", method = RequestMethod.GET)
String invoke(@RequestBody String value); String invoke();
} }
\ No newline at end of file
...@@ -9,9 +9,10 @@ package com.nepxion.discovery.plugin.example.feign; ...@@ -9,9 +9,10 @@ package com.nepxion.discovery.plugin.example.feign;
* @version 1.0 * @version 1.0
*/ */
import java.util.UUID;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.nepxion.discovery.plugin.framework.constant.PluginConstant; import com.nepxion.discovery.plugin.framework.constant.PluginConstant;
...@@ -23,7 +24,8 @@ public class AFeignImpl extends AbstractFeignImpl implements AFeign { ...@@ -23,7 +24,8 @@ public class AFeignImpl extends AbstractFeignImpl implements AFeign {
private BFeign bFeign; private BFeign bFeign;
@Override @Override
public String invoke(@RequestBody String value) { public String invoke() {
String value = "outside[" + UUID.randomUUID().toString() + "]";
value = doInvoke(value); value = doInvoke(value);
value = bFeign.invoke(value); value = bFeign.invoke(value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment