Skip to content

方便记录操作日志(基于SpEL:Spring Expression Language)

Notifications You must be signed in to change notification settings

wangsaisai/log-spel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

日志

  • 记录操作日志
  • 基于SpEL:Spring Expression Language(link: SpEL
  • 可记录接口耗时(end_time - start_time)
  • 基于java注解方式实现,对业务代码无侵入

依赖

  • spring boot 3
  • mybatis plus 3.5.3.1
  • jdk 17

module

  • core:基础类库
  • web:使用example

使用方式

核心是@LogRecord注解。使用方法参考com.bamboo.log.controller.BizController.java

Example Code:

@LogRecord(associateIdExpr = "#id", type = LogBizEnum.BIZ1, operation = "ADD")
@PostMapping("/add")
public String add(@RequestParam(name = "id") String id) {
  return "hello " + id;
}

记录的相关日志

img.png

About

方便记录操作日志(基于SpEL:Spring Expression Language)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages