1、配置web.xml文件:
2、配置spring-security.xml(该文件名字与web.xml中的<context-param />中的相对应) :
method拦截有三种配置方式:
第一种方式是在java代码添加注释@Secured({"ROLE_SUPER"})、在spring-security.xml中添加<global-method-security secured-annotations="enabled"></global-method-security>,具体配置如下:
spring-security.xml