クラス MethodSecurityMetadataSourceAdvisor

  • 実装されたすべてのインターフェース:
    java.io.Serializableorg.springframework.aop.Advisororg.springframework.aop.PointcutAdvisororg.springframework.beans.factory.Awareorg.springframework.beans.factory.BeanFactoryAwareorg.springframework.core.Ordered

    public class MethodSecurityMetadataSourceAdvisor
    extends org.springframework.aop.support.AbstractPointcutAdvisor
    implements org.springframework.beans.factory.BeanFactoryAware
    MethodSecurityMetadataSource によって駆動されるアドバイザー。パブリック(非セキュア)メソッドから MethodInterceptor を除外するために使用されます。

    AOP フレームワークはアドバイスの計算をキャッシュするため、これは通常、MethodInterceptor を実行して、実行する作業がないことを確認するよりも高速です。

    このクラスでは、Spring の DefaultAdvisorAutoProxyCreator を使用することもできます。これにより、セキュリティが必要なオブジェクトごとに ProxyFactoryBean をセットアップするよりも構成が簡単になります。後処理はアプリケーションコンテキストに対してのみ自動化されるため、自動プロキシは BeanFactory 実装ではサポートされていないことに注意してください。

    Spring の TransactionAttributeSourceAdvisor に基づいています。

    関連事項:
    直列化された形式
    • フィールドサマリー

      • インターフェース org.springframework.aop.Advisor から継承されたフィールド

        EMPTY_ADVICE
      • インターフェース org.springframework.core.Ordered から継承されたフィールド

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • コンストラクターのサマリー

      コンストラクター  
      コンストラクター 説明
      MethodSecurityMetadataSourceAdvisor​(java.lang.String adviceBeanName, MethodSecurityMetadataSource attributeSource, java.lang.String attributeSourceBeanName)
      アドバイザーをアドバイスから切り離したい状況のための代替コンストラクター。
    • メソッドのサマリー

      すべてのメソッド   インスタンスメソッド   具象メソッド  
      修飾子と型 メソッド 説明
      org.aopalliance.aop.AdvicegetAdvice()
      org.springframework.aop.PointcutgetPointcut()
      voidsetBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
      • クラス org.springframework.aop.support.AbstractPointcutAdvisor から継承されたメソッド

        equals, getOrder, hashCode, isPerInstance, setOrder
      • クラス java.lang.Object から継承されたメソッド

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • コンストラクターの詳細

      • MethodSecurityMetadataSourceAdvisor

        public MethodSecurityMetadataSourceAdvisor​(java.lang.String adviceBeanName,
                                                   MethodSecurityMetadataSource attributeSource,
                                                   java.lang.String attributeSourceBeanName)
        アドバイザーをアドバイスから切り離したい場合の代替コンストラクター。代わりに、アドバイス Bean 名を設定する必要があります。これにより、インターセプター (および AuthenticationManager) の積極的なインスタンス化が防止されます。たとえば、SEC-773 を参照してください。Bean ファクトリ検索による直列化をサポートするために、直接参照ではなく metadataSourceBeanName が使用されます。
        パラメーター:
        adviceBeanName - MethodSecurityInterceptor の名前 Bean
        attributeSource - SecurityMetadataSource (インターセプターで使用されているものと同じである必要があります)
        attributeSourceBeanName - attributeSource の Bean 名 (直列化に必要)
    • メソッドの詳細

      • getPointcut

        public org.springframework.aop.Pointcut getPointcut()
        次で指定:
        インターフェース org.springframework.aop.PointcutAdvisorgetPointcut 
      • getAdvice

        public org.aopalliance.aop.Advice getAdvice()
        次で指定:
        インターフェース org.springframework.aop.AdvisorgetAdvice 
      • setBeanFactory

        public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
        次で指定:
        インターフェース org.springframework.beans.factory.BeanFactoryAwaresetBeanFactory 
        例外:
        org.springframework.beans.BeansException