How can the log not be mixed with the business code?

if I need to make a log record of the user"s behavior, such as recording an info log when the user registers and a login log when logging in, that is, I want to do a log record for every behavior on the controller, but I don"t want to log it in Controller, so I mix the business code with the log record. How to design the log record if I want to extract the log record separately?

Mar.06,2021

use aop, aop is the best at this.


spring aop learn about

https://www.cnblogs.com/hongw.

Menu