为什么用@Transactional 注释的方法必须是可覆盖的

Why must methods annotated with @Transactional be overrideable

我有以下代码:

/**
 * Restored deleted partner
 */
@Transactional
public void restorePartnerById(Integer id){
    // logic      
}

当我使方法最终化时

/**
 * Restored deleted partner
 */
@Transactional
public final void restorePartnerById(Integer id){
    // logic      
}

我收到一个编译错误:

Methods annotated with @Transactional must be overridable

我四处寻找,但我无法理解为什么它必须能够被覆盖,为什么该方法必须能够被覆盖?

Spring 的 Transactional 用于创建覆盖方法的代理 class:

create a transactional proxy around the object that is created from the fooService bean definition. The proxy will be configured with the transactional advice, so that when an appropriate method is invoked on the proxy

我认为将方法更改为 final 与 @Trasacational 无关,请参阅此 link @Trasactional 将如何工作 http://www.codingpedia.org/jhadesdev/how-does-spring-transactional-really-work/