About database deletion and update logging issues

demand:

1.log;
2.log

requirements:

1.;
2.;
3.

which Daniel has ever achieved it? Solve.
the current idea is to use the mybatis interceptor to implement.

May.11,2022

has previously implemented a solution
is also an interceptor that uses MyBatis, but in order to avoid many useless log data
, a custom annotation is customized, annotated on the DO of the column that needs to be recorded, and the content is recorded in the interceptor.


you can also use the methods of aop, using the methods of update and delete as pointcuts, and then save the parameters and sql in the database.


mysql trigger, simple and rude, ok

for items with low concurrency
Menu