package com.congge.web;
import com.alibaba.fastjson2.JSON;
import com.congge.entity.User;
import com.congge.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {
@DubboReference
private UserService userService;
//http://localhost:8082/user/getByUserId?userId=001
@GetMapping("/getByUserId")
private User getByUserId(@RequestParam String userId) {
User user = userService.getByUserId(userId);
log.info("调用 dubbo 服务成功,获取用户信息:{}", JSON.toJSONString(user));
return user;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
springboot对接skywalking详解
共35个文件
xml:12个
class:6个
java:6个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 131 浏览量
2023-12-31
09:22:22
上传
评论
收藏 38KB ZIP 举报
温馨提示
springboot对接skywalking详解,从skywalking的安装部署,到基本使用,包括如何将springboot接入skywalking,dubbo微服务如何接入skywalking都有详细的案例,拿到代码看看而已直接运行
资源推荐
资源详情
资源评论
收起资源包目录
107.zip (35个子文件)
107
dubbo-consumer
pom.xml 1KB
src
test
java
main
resources
application.yml 197B
java
com
congge
web
UserController.java 962B
service
ConsumerApp.java 399B
target
classes
application.yml 209B
com
congge
web
UserController.class 1KB
ConsumerApp.class 749B
generated-sources
annotations
pom.xml 2KB
107.iml 80B
api
pom.xml 671B
src
test
java
main
resources
java
com
congge
service
UserService.java 138B
entity
User.java 308B
target
classes
com
congge
service
UserService.class 191B
entity
User.class 2KB
api-1.0-SNAPSHOT.jar 3KB
maven-status
maven-compiler-plugin
compile
default-compile
createdFiles.lst 66B
inputFiles.lst 134B
testCompile
default-testCompile
inputFiles.lst 0B
maven-archiver
pom.properties 110B
generated-sources
annotations
.idea
.name 9B
codeStyles
Project.xml 2KB
dbnavigator.xml 23KB
smartfox_info.xml 188B
workspace.xml 30KB
misc.xml 513B
inspectionProfiles
Project_Default.xml 9KB
compiler.xml 669B
encodings.xml 374B
dubbo-provider
pom.xml 1KB
src
test
java
main
resources
application.yml 199B
java
com
congge
ProviderApp.java 399B
controller
service
UserServiceImpl.java 426B
target
classes
application.yml 211B
com
congge
ProviderApp.class 749B
service
UserServiceImpl.class 1KB
generated-sources
annotations
共 35 条
- 1
资源评论
小码农叔叔
- 粉丝: 6w+
- 资源: 85
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功