Commit c0bfce92 by Nepxion

重构类结构

parent 447da0dd
......@@ -10,12 +10,11 @@ package com.nepxion.discovery.plugin.example.feign;
*/
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.RequestMethod;
@FeignClient(value = "discovery-springcloud-example-a")
public interface AFeign {
@RequestMapping(path = "/invoke", method = RequestMethod.POST)
String invoke(@RequestBody String value);
@RequestMapping(path = "/invoke", method = RequestMethod.GET)
String invoke();
}
\ No newline at end of file
......@@ -9,9 +9,10 @@ package com.nepxion.discovery.plugin.example.feign;
* @version 1.0
*/
import java.util.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.nepxion.discovery.plugin.framework.constant.PluginConstant;
......@@ -23,7 +24,8 @@ public class AFeignImpl extends AbstractFeignImpl implements AFeign {
private BFeign bFeign;
@Override
public String invoke(@RequestBody String value) {
public String invoke() {
String value = "outside[" + UUID.randomUUID().toString() + "]";
value = doInvoke(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