Announcement Announcement Module
Collapse
No announcement yet.
methods invocation interceptor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • methods invocation interceptor

    Hello Event body,
    I'm trying to use "MethodSecurityInterceptor" in order to manage methods invocation.
    But, this doesn't work.
    and i get in return this exeption:
    "Caused by: java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [org.springframework.security.access.meth
    od.MethodSecurityMetadataSource] for property 'securityMetadataSource': no matching editors or conversion strategy found
    "
    can you help me to get rid of this problem.

    SOURCE:
    "
    <beans: bean class="org.springframework.security.access.interce pt.aopalliance.MethodSecurityInterceptor"
    id="tutoManagerSecurity">
    <beans: property name="authenticationManager" ref="authenticationManager"/>
    <beans: property name="accessDecisionManager" ref="secureAccessDecisionManager"/>
    <beans: property name="afterInvocationManager" ref="postInvocationManager"/>
    <beans: property name="securityMetadataSource" >
    <beans: value>controller.MeetingController.connected_user* =ROLE_USER</beans:value>
    </beans: property>
    </beans: bean>


    <beans: bean id="secureAccessDecisionManager" class="org.springframework.security.access.vote.Un animousBased">
    <beans: property name="decisionVoters">
    <beans: list>
    <beans: ref bean="roleVoter" />
    <beans: ref bean="himselfVoter" />
    </beans: list>
    </beans: property>
    </beans: bean>

    <beans: bean id="roleVoter" class="org.springframework.security.access.vote.Ro leVoter">
    <beans: property name="rolePrefix">
    <beans: value>ROLE_</beans:value>
    </beans: property>
    </beans: bean>

    <beans: bean id="himselfVoter" class="security.HimselfVoter">
    <beans: property name="rolePrefix">
    <beans: value>HIMSELF</beans:value>
    </beans: property>
    </beans: bean>

    <beans: bean id="postInvocationManager"
    class="org.springframework.security.access.interce pt.AfterInvocationProviderManager">
    <beans: property name="providers">
    <beans: list>
    <beans: ref bean="postInvocationProvider" />
    </beans: list>
    </beans: property>
    </beans: bean>

    <beans: bean id="postInvocationProvider"
    class="org.springframework.security.access.prepost .PostInvocationAdviceProvider">
    <beans: constructor-arg ref="postAdvice" />
    </beans: bean>

    <beans: bean id="postAdvice"
    class="org.springframework.security.access.express ion.method.ExpressionBasedPostInvocationAdvice">
    <beans: constructor-arg ref="defaultMethodSecurityExpressionHandler" />
    </beans: bean>

    <beans: bean id="defaultMethodSecurityExpressionHandler"
    class="org.springframework.security.access.express ion.method.DefaultMethodSecurityExpressionHandler" />
    "
Working...
X