websphere:不支持的配置属性:[permitAll]使用spring

jef*_*ter 21 websphere spring spring-security

我收到以下错误...

Unsupported configuration attributes: [permitAll]
Run Code Online (Sandbox Code Playgroud)

添加....

<sec:intercept-url pattern="/nonsecure/**" access="permitAll" />
Run Code Online (Sandbox Code Playgroud)

我在使用Spring 2.5的Websphere上.

有人可以帮忙吗?

杰夫波特

A_J*_*A_J 57

你必须在security xml中的http配置中添加use-expressions标签,例如:

<http auto-config="true" use-expressions="true">
...
...
</http>
Run Code Online (Sandbox Code Playgroud)

  • 这才是真正的答案! (5认同)

Lux*_*pes 9

为了能够使用诸如[permitAll]之类的表达式,您必须将一个WebExpressionVoter添加到AccessDecisionManager