Files
peipei-backend/play-common/src/main/java/com/starry/common/annotation/Log.java
2024-03-20 09:28:04 +08:00

37 lines
845 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.starry.common.annotation;
import com.starry.common.enums.BusinessType;
import java.lang.annotation.*;
/**
* @author admin
* 自定义操作日志记录注解
* @since 2022/7/22
*/
@Target({ElementType.PARAMETER, ElementType.METHOD}) // 注解放置的目标位置,PARAMETER: 可用在参数上 METHOD可用在方法级别上
@Retention(RetentionPolicy.RUNTIME) // 指明修饰的注解的生存周期 RUNTIME运行级别保留
@Documented
public @interface Log {
/**
* 模块
*/
String title() default "";
/**
* 功能
*/
BusinessType businessType() default BusinessType.OTHER;
/**
* 是否保存请求的参数
*/
boolean isSaveRequestData() default true;
/**
* 是否保存响应的参数
*/
boolean isSaveResponseData() default true;
}