2010-08-02 86 views
20

我得到以下錯誤...的WebSphere:不支持的配置屬性:使用彈簧

Unsupported configuration attributes: [permitAll] 

當添加....

<sec:intercept-url pattern="/nonsecure/**" access="permitAll" /> 

我在WebSphere [permitAll]與Spring 2.5 。

任何人都可以幫忙嗎?

傑夫·波特

+0

看到這個答案 - http://stackoverflow.com/questions/3394657/spring-security-how-to-exclude-certain-resources/3394803#3394803 – Qrilka 2010-11-13 09:48:53

回答

56

你必須使用表達式標籤添加到您的HTTP配置在例如安全XML :

<http auto-config="true" use-expressions="true"> 
... 
... 
</http> 
+5

這是真正的答案! – 2013-11-10 07:43:37

+1

順便說一下,如果您使用Java配置,則此配置默認完成 – 2015-04-10 20:40:27

+0

也不要使用'auto-config':'遺留屬性會自動註冊登錄表單, BASIC身份驗證以及註銷URL和註銷服務。如果未指定 ,則默認爲「false」。我們建議您避免使用 這個,而是明確配置您需要的服務。 'from https://docs.spring.io/autorepo/schema/spring-security/3.2.0.RC2/security/spring-security-3.2.xsd – 2018-02-01 15:33:35