首页 > 代码库 > 注解 给接口监控方法加上自定义拦截记录
注解 给接口监控方法加上自定义拦截记录
/**
* 自定义注解 拦截器
* @author
* 给需要监控的方法加上改注解,就可以实现该方法的日志记录
*/
@Target({ ElementType.PARAMETER, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface WbmsService{
//描述
String description() default "";
//操作类型 同步:sync 异步 async
String oprateType() default "";
//客户名称
String clientName() default "";
}
使用方法 在被调用的方法实现类上添加该注解
@WbmsService(description = "客户欠款查询", oprateType = "sync", clientName = "")
注解 给接口监控方法加上自定义拦截记录
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。