spring.data.jap调用接口时实际上做了些啥

通过AOP调用 org.springframework.data.jpa.repository.support.SimpleJpaRepository

AOP需要经过如下interceptor

[org.springframework.aop.interceptor.ExposeInvocationInterceptor, 

INSTANCE, (class org.springframework.data.jpa.repository.support.LockModeRepositoryPostProcessor$LockModePopulatingMethodIntercceptor)

org.springframework.dao.support.PersistenceExceptionTranslationInterceptor, 

org.springframework.transaction.interceptor.TransactionInterceptor, 

org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor, 

org.springframework.dao.support.PersistenceExceptionTranslationInterceptor]

猜你喜欢

转载自butterluo.iteye.com/blog/1797841