Spring 安全标记库不适用于 JSF
Spring Security tag lib not working with JSF
大家好,我正在开始一个新项目,我想在其中使用 springboot 和 primefaces。
我已经关注了这篇文章https://codenotfound.com/jsf-primefaces-spring-security-example.html,但稍作改动,我不想使用 JoinFaces。除了 spring sec 标签库外,一切正常。
xmlns:sec="http://www.springframework.org/security/tags
现在我不确定如何配置 servletContext 以便 sec tags 可以工作。
这里是 Github repo 现在它是一个非常简单的项目,只是为了测试 SB + SS + PF 的组合
https://github.com/p500plus/springboot-with-security-and-primefaces
我之前遇到过同样的情况,最后我在我的 project.You 中添加了 springsecurity.taglib.xml 可以从以下位置复制文件内容:
https://docs.spring.io/autorepo/docs/webflow/2.3.x/reference/html/spring-faces.html#spring-faces-security-taglib
然后按如下方式在您的 web.xml 文件中注册它:
<context-param>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/springsecurity.taglib.xml</param-value>
</context-param>
希望对您有所帮助。
大家好,我正在开始一个新项目,我想在其中使用 springboot 和 primefaces。
我已经关注了这篇文章https://codenotfound.com/jsf-primefaces-spring-security-example.html,但稍作改动,我不想使用 JoinFaces。除了 spring sec 标签库外,一切正常。
xmlns:sec="http://www.springframework.org/security/tags
现在我不确定如何配置 servletContext 以便 sec tags 可以工作。
这里是 Github repo 现在它是一个非常简单的项目,只是为了测试 SB + SS + PF 的组合
https://github.com/p500plus/springboot-with-security-and-primefaces
我之前遇到过同样的情况,最后我在我的 project.You 中添加了 springsecurity.taglib.xml 可以从以下位置复制文件内容: https://docs.spring.io/autorepo/docs/webflow/2.3.x/reference/html/spring-faces.html#spring-faces-security-taglib
然后按如下方式在您的 web.xml 文件中注册它:
<context-param>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/springsecurity.taglib.xml</param-value>
</context-param>
希望对您有所帮助。