2009-06-10 5 views
0

2つのMethodSecurityInterceptor Beanを次のように定義できますか?複数のMethodSecurityInterceptor Beanを持つことは理にかなっていますか?

<beans> 
    <bean id="moduleOneMethodSecurity" 
     class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> 
     <property name="accessDecisionManager"><ref bean="serviceAccessDecisionManager"/></property> 
     <property name="authenticationManager"><ref bean="authenticationManager"/></property> 
     <property name="objectDefinitionSource"> 
      <value> 
      modules.first.MyObject.*=ROLE_MINE 
      </value> 
     </property> 
    </bean> 

     <bean id="moduleTwoMethodSecurity" 
      class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> 
      <property name="accessDecisionManager"><ref bean="serviceAccessDecisionManager"/></property> 
      <property name="authenticationManager"><ref bean="authenticationManager"/></property> 
      <property name="objectDefinitionSource"> 
       <value> 
       modules.second.YourObject.*=ROLE_YOURS 
       </value> 
      </property> 
     </bean> 
    </beans> 

これを行う理由は、モジュールごとのBean定義を別々のXMLファイルに分割するためです。

答えて

0

私はその細かいと思います。

関連する問題