开发者社区 问答 正文

增强 RestTemplate

现在我想在调用 RestTemplate 封装的 get,post 等方法,可以在调用方法前后打印时间戳,我要怎么通过aop去增强这个 RestTemplate?
来源:云原生后端社区

展开
收起
Atom 2020-04-25 14:49:41 924 分享 版权
1 条回答
写回答
取消 提交回答
  • aop 的 before 能满足你。aop 的 pointcut 是 resttamplate 全路径的限定啊。
    来源:云原生后端社区

    2020-04-25 14:50:12
    赞同 展开评论
问答分类:
问答地址: