在json响应内部放置一些变量
我们想在 json 响应中添加一些变量,但在方面内。
我们需要做一些类似于此函数中所做的事情,但不是使用请求,而是使用响应。
We want to add some variabale in json response, but inside aspect.
we need to do something similar to what is done in this function but instead of with the request it would be with the response.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想要确切的stramp还是只是方向?如果方向,请用自定义注释来注释您的方法以摆脱模式并执行类似的操作:
此处
@around
用于在您的方面包装调用。打字目标方法的结果,以您想要的方式对其进行修改。这只是一个近似的解决方案,不要将其判断为所需内容的确切实现。
you want exact impl or just the direction? if the direction, then annotate your method with custom annotation to get rid of patterns and do something like this:
Here
@Around
is used to wrap invocation within your aspect. Typecast the result of target method, modify it in the way you want and return.This is just an approximated solution, do not judge it as an exact implementation of what you need.