Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring SAML实现无法解析对bean的引用_Java_Spring Security_Vaadin_Saml_Spring Saml - Fatal编程技术网

Java Spring SAML实现无法解析对bean的引用

Java Spring SAML实现无法解析对bean的引用,java,spring-security,vaadin,saml,spring-saml,Java,Spring Security,Vaadin,Saml,Spring Saml,在我的Vaadin应用程序项目中,我想集成spring security SAML扩展。我从spring安全扩展页面下载了源代码。基于manual,我使用mvn包打包了扩展,并使用MVNDeploy命令将其部署到本地maven存储库中。一切正常。maven存储库中出现了一个已编译的扩展。因此,我将其作为依赖项包含在project pom.xml文件中,如下所示: <dependency> <groupId>org.springframework.s

在我的Vaadin应用程序项目中,我想集成spring security SAML扩展。我从spring安全扩展页面下载了源代码。基于manual,我使用mvn包打包了扩展,并使用MVNDeploy命令将其部署到本地maven存储库中。一切正常。maven存储库中出现了一个已编译的扩展。因此,我将其作为依赖项包含在project pom.xml文件中,如下所示:

    <dependency>
        <groupId>org.springframework.security.extensions</groupId>
        <artifactId>spring-security-saml2-core</artifactId>
        <version>1.0.0-RC1-SNAPSHOT</version>
    </dependency>

我发现有几个主题有这样的问题,但不同的库。没有人能帮我解决我的问题。似乎在war存档中找不到或无法解析org.springframework.security.saml.SAMLAuthenticationProvider。但是我手动检查了它,并在WEB-INF/lib文件夹spring-security-saml2-core-1.0.0-RC1-SNAPSHOT.jar中找到了它。我还检查了jar归档内部,找到了SAMLAuthenticationProvider.class。有人能帮我解决问题吗。也许有人对Spring安全性和saml扩展有经验

我发现我使用的是不完整的securityContext.xml文件

,所以您可以更新以显示完整的securityContext.xml文件吗?我对此也很感兴趣,因为我的securityContext在升级到最新的Spring security 1.0.2之前似乎是完整的,并且可以正常工作,但在升级到最新的Spring security 1.0.2之后就不行了。
    <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:security="http://www.springframework.org/schema/security"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:annotation-config />
    <context:component-scan base-package="org.springframework.security.saml"/>

    <security:http entry-point-ref="samlEntryPoint">
        <security:intercept-url pattern="/*" access="IS_AUTHENTICATED_FULLY"/>
        <security:custom-filter before="FIRST" ref="metadataGeneratorFilter"/>
        <security:custom-filter after="BASIC_AUTH_FILTER" ref="samlFilter"/>
    </security:http>

    <security:authentication-manager alias="authenticationManager">
        <security:authentication-provider ref="samlAuthenticationProvider"/>
    </security:authentication-manager>

    <bean id="samlAuthenticationProvider" class="org.springframework.security.saml.SAMLAuthenticationProvider">      

    </bean> 

    <bean id="samlEntryPoint" class="org.springframework.security.saml.SAMLEntryPoint">
        <property name="defaultProfileOptions">
            <bean class="org.springframework.security.saml.websso.WebSSOProfileOptions">
                <property name="includeScoping" value="false"/>
            </bean>
        </property>
    </bean>

    <bean id="metadataGeneratorFilter" class="org.springframework.security.saml.metadata.MetadataGeneratorFilter">
    <constructor-arg>
        <bean class="org.springframework.security.saml.metadata.MetadataGenerator"/>
    </constructor-arg>
</bean>
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'org.springframework.security.authentication.ProviderManager#0': 
Cannot create inner bean '(inner bean)' of type [org.springframework.security.config.authentication.AuthenticationManagerFactoryBean] while setting bean property 'parent'; nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name '(inner bean)': 
FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'samlAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.