【问题标题】:websphere: Unsupported configuration attributes: [permitAll] using springwebsphere:不支持的配置属性:[permitAll] 使用 spring
【发布时间】:2011-03-24 06:13:01
【问题描述】:

我收到以下错误...

Unsupported configuration attributes: [permitAll]

添加时 ....

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

我在使用 Spring 2.5 的 Websphere。

谁能帮忙?

杰夫·波特

【问题讨论】:

标签: spring spring-security websphere


【解决方案1】:

您必须将 use-expressions 标签添加到安全 xml 中的 http 配置中,例如:

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

【讨论】:

  • 这才是真正的答案!
  • 顺便说一句,如果您使用 Java 配置,则默认情况下会完成此配置
  • 也不要再使用auto-config了:A legacy attribute which automatically registers a login form, BASIC authentication and a logout URL and logout services. If unspecified, defaults to "false". We'd recommend you avoid using this and instead explicitly configure the services you require. from docs.spring.io/autorepo/schema/spring-security/3.2.0.RC2/…
【解决方案2】:

为了能够使用 [permitAll] 等表达式,您必须添加 WebExpressionVoter to your AccessDecisionManager

【讨论】:

    猜你喜欢
    • 2021-11-17
    • 1970-01-01
    • 1970-01-01
    • 2017-11-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-10
    • 2018-09-08
    相关资源
    最近更新 更多