Frequently Asked Questions
Common
-
I’d like to get more detailed logging information on what methods are called inside
JpaRepository
for example. How can I gain them?You can make use of
CustomizableTraceInterceptor
provided by Spring, as shown in the following example:<bean id="customizableTraceInterceptor" class=" org.springframework.aop.interceptor.CustomizableTraceInterceptor"> <property name="enterMessage" value="Entering $[methodName]($[arguments])"/> <property name="exitMessage" value="Leaving $[methodName](): $[returnValue]"/> </bean> <aop:config> <aop:advisor advice-ref="customizableTraceInterceptor" pointcut="execution(public * org.springframework.data.jpa.repository.JpaRepository+.*(..))"/> </aop:config>