Comments (2)
服务端:com.example.demo_0313.service.UserService和UserServiceImpl
客户端:com.example.clientdemo.service.UserService和UserServiceImpl
我在客户端新建软件包,把类路径改为com.example.demo_0313.service.UserService和UserServiceImpl之后可以完成调用。
如果这边需要保证客户端和服务端包括路径在内UserService完全相同,这样是不是不太合理?还是有其他处理办法?
from starlight.
当我修改服务端的UserService代码添加@RequestMapping("/user")和@GetMapping后,启用客户端的rest调用,通过8777可以调用服务端getUser方法,但是通过8666调用时,会报错如下:
"Server failed to execute target method, cause by: NoClassDefFoundError, Could not initialize class com.baidu.cloud.thirdparty.feign.Util"
客户端报错如下:
`已经进入了, userId = 1
2023-03-14 18:37:32.452 ERROR 29980 --- [ star-s-biz-2] c.b.c.s.core.rpc.RpcServiceInvoker : Failed to execute method getUser, caused by
java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at com.baidu.cloud.starlight.core.rpc.RpcServiceInvoker.invoke(RpcServiceInvoker.java:85) ~[starlight-all-2022.2.0.jar:na]`
请教该如何处理?
from starlight.
Related Issues (20)
- Why NShead protocol can't coexistence with other protocols
- 请问下rpc server端能支持返回空对象吗 HOT 1
- bug fix of hulu protocol attachment
- brpc-java RpcServer.shutdown()报错 HOT 1
- com.baidu.brpc.naming.HealthyCheckTimer 健康检查逻辑问题
- 这是什么代码?
- Java brpc client 如何获取 远端的ip port HOT 2
- HealthyCheckTimer 发现可用机器列表bug,如果机器重启,roundRobin会导致流量分配不均
- 怎么支持广播
- 问下brpc-java有计划捐给apache吗?
- 请问brpc-java不支持一致性hash负载均衡策略吗? HOT 1
- BaiduRpcProtocol第102行,会产生ClassCastException HOT 2
- DEMO信息缺失、勘误和问题请教
- 有计划支持RDMA吗 HOT 2
- 现在的版本不支持JDK17吗 HOT 1
- com.baidu.cloud:spring-cloud-baidu-thirdparty-commons:jar:2022.2.0 与 Netty Epoll 冲突 HOT 3
- can increase the network usage for reading data from cpp server by java client HOT 2
- Java版本支持streaming HOT 1
- BaiduBrpcProtocol 协议存在bytebuf over release 问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starlight.