更新时间:2023-01-07 12:16:14
您需要首先添加 springsecurity.taglib.xml
as这里提到:
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">