更新时间:2023-01-07 12:03:10
你需要先添加springsecurity.taglib.xml如此处所述:
You will need to add springsecurity.taglib.xml first as mentioned here:
并且你应该在你的类路径中有 org.springframework.faces jar 以便使用它.
and you should have the org.springframework.faces jar in your classpath in order to use it.
然后使用如下安全标签:
then use the security tags as follows:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:sec="http://www.springframework.org/security/tags">