当前位置:网站首页>自定义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;
}
}
边栏推荐
- NetApp FAS系列一个CIFS bug引起的控制器重启案例分享
- LeetCode 70爬楼梯、199二叉树的右视图、232用栈实现队列、143重排链表
- The new red envelope cover platform can build the source code of the independent background of the sub station
- 【补题日记】[2022杭电暑期多校1]B-Dragon slayer
- Redraw the button and make your own circular LED indicator
- [diary of supplementary questions] [2022 Niuke summer school 1] c-grab the seat
- Implementation of POP3 client code
- 微信小程序实现折线面积图-玫瑰图-立体柱状图
- 7 issues to consider before website construction
- Responsive pbootcms template decoration design website
猜你喜欢

Visual full link log tracking

The new red envelope cover platform can build the source code of the independent background of the sub station
![STM32 installation tutorial and j-link burning driver installation tutorial [the next day]](/img/09/def640c771f1b9effaaec3844d4cd3.png)
STM32 installation tutorial and j-link burning driver installation tutorial [the next day]

ggplot2显示png

Unity TimeLine使用教程

Research and analysis of the third-party dependency library Ag grid

Async await details & Promise

组件el-scrollbar的使用

氢能创业大赛 | 国华投资董事长刘小奇:发挥风光氢储融一体化优势 高水平承办创业大赛

Diablo king, analysis of low illumination image enhancement technology
随机推荐
Today's code farmer girl learned about the express framework under node
BPG notes (III)
Implementation of POP3 client code
认识传输层协议—TCP/UDP
Leetcode 70 climbing stairs, 199 right view of binary tree, 232 realizing queue with stack, 143 rearranging linked list
async await详解 & Promise
[diary of supplementary questions] [2022 Niuke summer school 1] d-mocha and railgun
Brief introduction of tfw6524 perfectly replacing imported pt6524 chip
[Luogu] p1318 ponding area
[diary of supplementary questions] [2022 Hangdian summer school 1] b-dragon Slayer
Where is the safest place to open a futures account now with the lowest handling fee?
Wallys/DR4019S/IPQ4019/11ABGN/802.11AC/high power
Codeworks 5 questions per day (average 1500) - day 23
Writing of graph nodes that trigger different special effects during the day and at night in Tiktok
C language curriculum - personal information management system (including student grades and consumption records)
2022.7.22 JS entry common data types and methods
【知识图谱】实践篇——基于医疗知识图谱的问答系统实践(Part2):图谱数据准备与导入
营员招募|心怀世界的AI青年们,联合国需要你为可持续发展助力!
Causal learning open source project: from prediction to decision!
Dynamically set the navigationbartitletext of the applet