我正在尝试使用AOP记录存储库类名.但是在运行时我在日志中获取代理类名称,因为我在我的项目中使用了spring数据,因此有一个用于存储库的接口,它将在春天实现.请提出答案,因为我花了很多时间找到相同的答案.
以下是执行后生成的日志.
className - No of records returned : 38
2017-02-03 19:54:43,360 [INFO] className - Exiting method: getAlertPatterns]
2017-02-03 19:54:43,360 [INFO] className - No of records returned : 38
2017-02-03 19:54:43,360 [INFO] className - Exiting method: getAlertPatterns]
2017-02-03 19:54:43,363 [INFO] controllerClassName - Exiting method: getAlertPatterns]
2017-02-03 19:54:46,457 [INFO] controllerClassName - ActionTakenController***Entering method: getAlertActions]
2017-02-03 19:54:46,458 [INFO] className - ActionTakenServiceImpl****Entering method: getAlertActions]
2017-02-03 19:54:46,458 [INFO] className - $Proxy158****Entering method: getAlertActions]
2017-02-03 19:54:46,510 [INFO] repositoryClassName - java.util.ArrayList***
2017-02-03 19:54:46,511 [INFO] repositoryClassName - …Run Code Online (Sandbox Code Playgroud)