eureka、feign整合
parent
04de7a67fe
commit
9a025cd3e3
@ -0,0 +1,32 @@
|
||||
package cn.estsh.i3plus.core.apiservice.controller;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.platform.bean.LogOperate;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppExceptionEnum;
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cloud")
|
||||
@Api(description="分布式服务测试")
|
||||
public class DemoCloudController {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DemoCloudController.class);
|
||||
|
||||
@GetMapping(value="/test")
|
||||
@ApiOperation(value="测试",notes = "测试")
|
||||
public ResultBean simpleTest(String test) {
|
||||
LOGGER.info("【接受数据】{}" + test);
|
||||
test += "cloud return = ";
|
||||
return ResultBean.success("返回:" + test).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.estsh.i3plus.core.api.controller;
|
||||
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@FeignClient("/cloud")
|
||||
public interface DemoCloudInterface {
|
||||
|
||||
@GetMapping(value="/test")
|
||||
@ApiOperation(value="测试",notes = "测试")
|
||||
ResultBean simpleTest(String test);
|
||||
}
|
Loading…
Reference in New Issue