---
title: "自定义过滤器时，不能再使用<sec:authorize url=\"\">问题"
author: "wutao8818"
date: "2014-11-24T10:40:57Z"
tags: ["Spring Security"]
categories: ["编程语言"]
slug: "sec-authorize-url"
draft: false
lastmod: "2014-11-24T10:44:00Z"
id: 2159610
url: "https://wutaoo.iteye.com/blog/2159610"
---

需要添加applicationContext-security.xml文件中添加以下配置 \[code="xml"] \[/code] 其中myFilterSecurityInterceptor为自定义扩展的AbstractSecurityInterceptor 另外一个关键的地方时以上的配置文件必须在 \[code="xml"]\[/code] 配置以前，如果位置不对，也不会产生效果。 参考：\[url]http://hi.baidu.com/gestapo8/item/4e78d3d78dae3095270ae745\[/url]