1

複数のインターセプターが定義されている場合、Spring フレームワークでのインターセプター呼び出しのデフォルトの順序は何ですか?インターセプター呼び出しの順序付けのために、Spring フレームワークの Ordered インターフェイスを実装する必要がありますか?Ordered インターフェイスが実装されていない場合、順序付けの処理方法。制御されるフレームワークのクラスから実装されますか?たとえば、....package.class.methodName で実際のメソッドを呼び出す前に、ログイン、特権、キャッシュ、セキュリティ、動的操作の 5 つのインターセプターがあります。

ここにxmlがあります

<aop:config>
        <aop:aspect id="interceptor1" ref="beanId">
            <aop:pointcut id="pointcut" expression="execution(* *..*ServiceImpl.*(..))" />
            <aop:before pointcut-ref="pointcut" method="someMethod" />
            <aop:after pointcut-ref="pointcut" method="someMethod1" />
        </aop:aspect>
    </aop:config>
    <bean id="beanId" class="className">

    </bean>
4

0 に答える 0