Hi
i have the same problem, using spring 2.5.3 and spring-security 2.0
my config is:
Code:
<security:global-method-security >
<security:protect-pointcut expression="execution(* de.reitsportkoch.*Service.*(..))" access="ROLE_USER"/>
</security:global-method-security>
or
Code:
<security:global-method-security secured-annotations="enabled" />
and / or
Code:
<bean id="daacc" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>
<bean id="objectDefinitionSource" class="org.springframework.security.annotation.SecuredMethodDefinitionSource">
</bean>
<bean id="securityInterceptor" class="org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref local="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="objectDefinitionSource">
<ref local="objectDefinitionSource"/>
</property>
</bean>
for my junit test i create a AnonymousAuthenticationToken
so I expect that all my methods in the service, marked with @Secured
should throw a SecurityException. but this doesn't happen.
i haves looked into the docs and into the sample apps, but i didn't find my mistake.
i hope you can help, me. if you need more informations, so tell me.
thank you verry much
mfg Gideon