Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wangji92/rpc-exception-handler-spring-boot-start
rpc exception handler reference spring mvc gloable exception hander annotation RpcServiceAdvice==ControllerAdvice RpcServiceExceptionHandler==ExceptionHandler is much easier to use.already support dubbo 2.7.0 and dubbo 2.7.10
https://github.com/wangji92/rpc-exception-handler-spring-boot-start
dubbo dubbo-filter rpc-expection-handler spring-boot-starter
Last synced: 13 days ago
JSON representation
rpc exception handler reference spring mvc gloable exception hander annotation RpcServiceAdvice==ControllerAdvice RpcServiceExceptionHandler==ExceptionHandler is much easier to use.already support dubbo 2.7.0 and dubbo 2.7.10
- Host: GitHub
- URL: https://github.com/wangji92/rpc-exception-handler-spring-boot-start
- Owner: WangJi92
- Created: 2021-05-12T00:42:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-16T16:53:08.000Z (over 3 years ago)
- Last Synced: 2024-11-09T19:49:23.535Z (about 2 months ago)
- Topics: dubbo, dubbo-filter, rpc-expection-handler, spring-boot-starter
- Language: Java
- Homepage:
- Size: 234 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rpc-exception-handler-spring-boot-start
### 我想干啥?
spring mvc 有 @ControllerAdvice and @ExceptionHandler
最近在处理外部暴露的服务需要进行异常的处理,通过Aop 去实现的,不够优雅,代码 判断各种异常的处理,非常的恶心~ 是否可以做个
类似 spring 的这种全局异常处理器 @RpcServiceAdvice and @RpcServiceExceptionHandler。* 需要解析全局的 @RpcServiceAdvice。
* 参考spring mvc 还需要知道当前接口实现类中的是否含有 @RpcServiceExceptionHandler 优先级提升,找不到在去处理全局的@RpcServiceAdvice。
不过这里要注意一下 对于外部暴露的dubbo spi 服务都有统一的返回值XXXResult 不然全局处理器和方法返回的值类型不一样会导致消费者端接收失败。
一般这种异常都是记录日志,返回失败标识、提示信息等等即可。