Facelet Richfaces Spring 安全标签

Facelet Richfaces Spring Security Tags

我正在尝试让 Spring 安全标签在我的 facelets 页面中工作。我按照这份文件做了所有事情

http://docs.spring.io/autorepo/docs/webflow/2.3.x/reference/html/spring-faces.html#spring-faces-security-taglib

它要求我提供 spring faces jar 和 spring webflow jar。我给了

spring-faces-2.3.0.RELEASE.jar spring-webflow-2.3.0.RELEASE.jar

我的其他 spring 版本是 3.0.2。

现在,当我启动服务器时,出现堆栈溢出错误

Caused by: java.lang.WhosebugError
    at java.util.concurrent.ConcurrentHashMap.hash(Unknown Source)
    at java.util.concurrent.ConcurrentHashMap.get(Unknown Source)
    at org.apache.catalina.core.ApplicationContext.getAttribute(ApplicationContext.java:236)
    at org.apache.catalina.core.ApplicationContextFacade.getAttribute(ApplicationContextFacade.java:376)
    at org.apache.myfaces.context.servlet.ApplicationMap.getAttribute(ApplicationMap.java:47)
    at org.apache.myfaces.util.AbstractThreadSafeAttributeMap.get(AbstractThreadSafeAttributeMap.java:90)
    at javax.faces.application.Application.getMyfacesApplicationInstance(Application.java:100)
    at javax.faces.application.Application.setFlowHandler(Application.java:1245)
    at javax.faces.application.Application.setFlowHandler(Application.java:1248)
    at javax.faces.application.Application.setFlowHandler(Application.java:1248)

不知道是什么版本冲突。感谢任何帮助。

我的pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>SasMrm_Jars1</groupId>
  <artifactId>SasMrm_Jars1</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>SasMrm_Jars1</name>
  <dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jms</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-oxm</artifactId>
        <version>3.2.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>3.1.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>3.1.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>3.1.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-taglibs</artifactId>
        <version>3.1.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-ldap</artifactId>
        <version>3.1.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.webflow</groupId>
        <artifactId>spring-webflow</artifactId>
        <version>2.3.2.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.webflow</groupId>
        <artifactId>spring-faces</artifactId>
        <version>2.3.2.RELEASE</version>
    </dependency>   
  </dependencies>
</project>

spring-faces-2.3.0.RELEASE.jar 需要比 3.0.2 更高的 spring 版本。

在 SpringSource Enterprise Bundle Repository 页面 sub-heading“Required Dependencies”下查看 here

如你所见,主要需要Spring版本3.2.5.RELEASE3.0.7.RELEASE.

希望对您有所帮助。

编辑:

对于您现在使用的 spring-faces-2.3.2.RELEASE.jar,以下是所需的依赖项: