[英]what happen when override spring repository method without implementing
Here is my spring
repository interface 这是我的
spring
存储库界面
interface TupleRepository extends JpaRepository<Tuple, Integer> {
@Override
@CacheEvict(cacheNames="tuples", allEntries=true)
void delete(Tuple tuple);
}
As you see I overrided withoud giving any implementation. 如您所见,我没有提供任何实现。 the method is still working.
该方法仍然有效。
Which implem is being called. 哪个障碍被称为。
I tried the debugging and investigation but ended up in the aop class managing the call. 我尝试了调试和调查,但最终遇到了管理该调用的aop类。
does this method still call the jpaRepository implementation or what ? 此方法仍然调用jpaRepository实现还是什么?
The thing is, you did not actually provide an overriding implementation, so there is nothing really to debug on. 关键是,您实际上没有提供一个最重要的实现,因此没有什么可调试的。 At the end, the original implementation will be called.
最后,将调用原始实现。 The annotations you added on the method should be respected, though.
不过,应注意您在方法上添加的注释。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.