How to log the time taken by methods in Springframework?

前端 未结 5 1741
时光说笑
时光说笑 2021-01-31 06:20

Is it possible in springframework to log the time taken by methods [ selective | all ] automatically. By automatically i mean, i don\'t want to go to each method and write the l

5条回答
  •  滥情空心
    2021-01-31 07:04

    You can use AspectJ for this, declare a log pointcut called by wildcard with pre- and post handling by before() and after() advice.

提交回复
热议问题