This question already has an answer here:
Anyone has any idea on how to log method entries(including parameters value) and exit with Spring AOP and log4j at trace level. It should be able to log classes from multiple packages.
This question already has an answer here:
Anyone has any idea on how to log method entries(including parameters value) and exit with Spring AOP and log4j at trace level. It should be able to log classes from multiple packages.
You can use PerformanceMonitorInterceptor of Spring framework to log method entries.Here is the sample usage from DZone.
You can use @Around(..) aspect for such purposes:
In this example around aspect logs all method calls for all subpackages under com.blablabla.server package. Also it logs all method input parameters.