package org.example.consumer.controller;
import org.apache.dubbo.config.annotation.DubboReference;
import org.example.consumer.service.ConsumerService;
import org.example.provider.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
/**
* @author qx
* @date 2023/9/27
* @des
*/
@RestController
public class ConsumerController {
@Autowired
private RestTemplate restTemplate;
@Autowired
private ConsumerService consumerService;
@RequestMapping("/echo2/{str}")
public String echo2(@PathVariable("str") String str){
//return restTemplate.getForObject("http://cloud-provider/echo/"+str,String.class);
return consumerService.echo(str);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
cloud-demo.zip (34个子文件)
cloud-demo
cloud-provider
pom.xml 1KB
src
test
java
org
example
provider
AppTest.java 685B
main
resources
application.yml 630B
java
org
example
provider
CloudProviderApplication.java 486B
controller
ProviderController.java 488B
service
impl
ProviderServiceImpl.java 530B
ProviderService.java 310B
target
classes
application.yml 630B
org
example
provider
controller
ProviderController.class 1009B
CloudProviderApplication.class 838B
service
impl
ProviderServiceImpl.class 1KB
ProviderService.class 232B
generated-sources
annotations
.gitignore 490B
pom.xml 2KB
.idea
jarRepositories.xml 880B
workspace.xml 4KB
misc.xml 821B
compiler.xml 829B
.gitignore 184B
encodings.xml 530B
.gitignore 490B
cloud-consumer
pom.xml 2KB
src
test
java
org
example
AppTest.java 677B
main
resources
application.yml 578B
java
org
example
consumer
controller
ConsumerController.java 992B
CloudConsumerApplication.java 776B
service
ConsumerService.java 399B
impl
ConsumerServiceImpl.java 639B
target
classes
application.yml 578B
org
example
consumer
controller
ConsumerController.class 1KB
service
ConsumerService.class 232B
impl
ConsumerServiceImpl.class 934B
CloudConsumerApplication.class 1KB
generated-sources
annotations
.gitignore 490B
共 34 条
- 1
资源评论
qinxun2008081
- 粉丝: 26
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功