Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
版本信息:
JDK 版本(必填) : 1.8.0
源码版本(必填):
MySQL(必填): 5.7.9
Nacos(必填):
问题描述:
您好,在您提供的demo中(图1),我看到所有的controller返回数据Bean,
R
均在接口方法里进行了封装(图2)。我之前在别地方看到有一种方式是接口只返回原始数据,而数据 Bean
R
在@RestControllerAdvice
注解的Advice类里进行统一封装(图3)。请问您觉得这两种方式各自的优缺有哪些,哪一种更适合?期待您的回复,谢谢!
相关截图
支持一下
如果该issue帮助了你, 麻烦给项目点个star, 并给当前issue回复一下 “👍” 或者 “已解决”.
Beta Was this translation helpful? Give feedback.
All reactions