2011-11-01 15 views
1

<http > <intercept-url pattern="/a.jsp" access="hasRole('ROLE_X')"/> </http>
in spring security3.0.7或3.1
這是好的。只有'ROLE_X'可以看到a.jsp頁面。spring security3的保護切入點不起作用

但:
<global-method-security > <protect-pointcut expression="execution(* test.Test.o1*(..))" access="hasRole('ROLE_X')"/> </global-method-security>
它不工作,eneryone可以使用的方法test.Test.o1 ~~


當預後註釋= 「啓用」
@PreAuthorize("hasRole('ROLE_X')")
它也沒有工作,eneryone可以使用的方法test.Test.o1 ~~


我很傷心~~
任何意見或使用「全球方法 - 安全'演示,第三。

回答