当前位置:网站首页>自定义log注解,请求抓取
自定义log注解,请求抓取
2022-07-24 02:31:00 【斯普润布特】
- 自定义log注解,请求抓取,配合切面手段,轻松实现日志埋点
CP_OperateLog
/*
* COPYRIGHT Beijing cp-boss-Tech Co.,Ltd. *
****************************************************************************
* 源文件名: CP_OperateLog.java
* 功能: cpframework框架
* 版本: @version 1.0
* 编制日期: 2013年12月30日 上午10:58:09
* 修改历史: (主要历史变动原因及说明)
* YYYY-MM-DD | Author | Change Description
* 2013年12月30日 | hanqunfeng | Created
*/
package com.demo;
import java.lang.annotation.*;
/**
*Description: <功能操作日志注解>. <br>
*<p>
<声明在被spring管理的类的方法上,会记录下当前的操作日志类型>
比如:@CP_OperateLog(value="注解日志",type=1,key="test")
</p>
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CP_OperateLog {
/**
* 用户操作名称
* @return 用户操作名称,默认为空串
*/
String value() default "";
/**
* 用户操作类型,默认类型为0<br/>
* 0 - 其他操作 <br/>
* 1 - 查询 <br/>
* 2 - 新增 <br/>
* 3 - 修改 <br/>
* 4 - 删除
* @return 用户操作类型
*/
CP_GlobalNamingConstant type() default CP_GlobalNamingConstant.OPERATE_DEFAULT;
/**
* 用户操作名称对应的key,可以通过该key值在属性文件中查找对应的value
* @return key
*/
String key() default "";
}
CP_GlobalNamingConstant
/*******************************************************************************
* COPYRIGHT Beijing cp-boss-Tech Co.,Ltd. *
*******************************************************************************
* 源文件名: CP_GlobalNamingConstant.java
* 功能:
* 版本: 1.0
* 编制日期: 2009-4-22
* 说明:
* 修改历史: (主要历史变动原因及说明)
* YYMMDD | Author | Change Description
* 2009-4-22 Liujiajun Created
*******************************************************************************/
package com.demo;
public enum CP_GlobalNamingConstant {
/**
* ****************************************************
* 用户操作日志记录类型定义<br/>
* ****************************************************
*/
/**
* 用户操作类型:导入
*/
OPERATE_IMPORT("导入"),
/**
* 用户操作类型:导出
*/
OPERATE_EXPORT("导出"),
/**
* 用户操作类型:获取对象
*/
OPERATE_ENTUITY("获取对象"),
/**
* 用户操作类型:获取列表
*/
OPERATE_LIST("获取列表"),
/**
* 用户操作类型:添加记录
*/
OPERATE_ADD("添加记录"),
/**
* 用户操作类型:修改记录
*/
OPERATE_MODIFY("修改记录"),
/**
* 复制对象
*/
OPERATE_COPY("复制对象"),
/**
* 用户操作类型:删除记录
*/
OPERATE_DELETE("删除记录"),
/**
* 用户操作类型:编辑记录
*/
OPERATE_EDIT("编辑记录"),
/**
* 用户操作类型:数据详细信息
*/
OPERATE_DETAIL_MODIFY("修改记录"),
/**
* 用户操作类型:上传
*/
OPERATE_UPLOAD("上传"),
/**
* 用户操作类型:下载
*/
OPERATE_DOWNLOAD("下载"),
/**
* 用户操作类型:缓存管理
*/
OPERATE_CACHE("缓存管理"),
/**
* 用户操作类型:默认
*/
OPERATE_DEFAULT("默认");
private String desc;//中文描述
/**
* 私有构造,防止被外部调用
* @param desc
*/
private CP_GlobalNamingConstant(String desc){
this.desc=desc;
}
/**
* 定义方法,返回描述,跟常规类的定义没区别
* @return
*/
public String getDesc(){
return desc;
}
/**
* 覆盖
* @return
*/
@Override
public String toString() {
return desc;
}
}
边栏推荐
- 2022.7.22 JS entry common data types and methods
- 关于 SAP 电商云 Spartacus UI Transfer State 冗余 API 请求发送的讨论
- [diary of supplementary questions] [2022 Hangdian summer school 1] b-dragon Slayer
- Crop leaf disease identification system
- 利用宝塔面板计划任务执行自动推送网址到百度收录
- 微信小程序實現折線面積圖-玫瑰圖-立體柱狀圖
- 什么叫裸写SQL?express操作mysql用什么中件间或插件好呢?
- How to do a good job of accompanying translation
- [diary of supplementary questions] [2022 Hangdian summer school 1] c-backpack
- Use the hiflow scene connector to view the epidemic situation in the region every day
猜你喜欢

我国科学家在高安全量子密钥分发网络方面取得新进展

MySQL---four JDBC

输入cnpm -v出现cnpm : 无法加载文件 C:\Users\19457\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本。

Unity TimeLine使用教程

Leetcode 203. remove linked list elements (2022.07.22)

关于缺少编程基础的朋友想转行 ABAP 开发岗提出的一些咨询问题和解答

网络协议详解:TCP Part1

wallys/WiFi6 MiniPCIe Module 2T2R2 × 2.4GHz 2x5GHz MT7915 MT7975

响应式布局一个网页在不同设备显示不同效果)meta:vp
![[diary of supplementary questions] [2022 Niuke summer school 1] i-chiitoitsu](/img/be/47b8a86399f760e7cd6181528884c6.png)
[diary of supplementary questions] [2022 Niuke summer school 1] i-chiitoitsu
随机推荐
MySQL---four JDBC
Combined with actual combat, analyze gb/t 28181 (II) -- equipment directory synchronization
Pbootcms template calls the tag ordinal number from 2 or automatic number
Backward quantum cryptography migration! NIST announces 12 Partners
[untitled]
Mysql数据库,查询篇
Hydrogen entrepreneurship competition | Liu Xiaoqi, chairman of Guohua Investment: take advantage of the integration of scenery, hydrogen storage and finance to host the entrepreneurship competition a
【FPGA教程案例39】通信案例9——基于FPGA的交织-解交织数据传输
認識傳輸層協議—TCP/UDP
Discussion on sending redundant API requests for Spartacus UI transfer state of SAP e-commerce cloud
[MySQL] character set utf8mb4 cannot store the record of expression stepping on the pit
Qml- use listview to build a three-level treeview architecture
Share two interesting special effects
1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
Redis 6.0 source code learning simple dynamic string
微信小程序实现折线面积图-玫瑰图-立体柱状图
7 issues to consider before website construction
Causal learning open source project: from prediction to decision!
Wallys/DR4019S/IPQ4019/11ABGN/802.11AC/high power
async await详解 & Promise