次のコードを使用していたユーザがIでログインしているかどうかをテストしようとすると:ユーザーがログインしているかどうかを確認するためのSpring認可タグを使用しているときのエラー?
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<sec:authorize access="isAuthenticated()">
YES, you are logged in!
</sec:authorize>
をしかし、私は、次のerorrを取得していますか?
javax.servlet.jsp.JspException: No visible WebSecurityExpressionHandler instance could be found in the application context. There must be at least one in order to support expressions in JSP 'authorize' tags.
at org.springframework.security.taglibs.authz.AuthorizeTag.getExpressionHandler(AuthorizeTag.java:100)
at org.springframework.security.taglibs.authz.AuthorizeTag.authorizeUsingAccessExpression(AuthorizeTag.java:58)
at org.springframework.security.taglibs.authz.AuthorizeTag.doStartTag(AuthorizeTag.java:48)
- ちょうどそのようなあなたのセキュリティコンテキストで新しいBeanを宣言式と標準表記法の両方を使用するには
。ありがとうございました。あなたは正しいです – SJS