简体   繁体   English

Spring / SAML配置-创建Bean时出错

[英]Spring/SAML configuration - Error Creating Bean

I have a GWT/Spring app that we are hoping to use with a Single Signon IDP. 我有一个GWT / Spring应用程序,希望与Single Signon IDP一起使用。 The app builds fine but fails on startup when trying to configure Spring Security and SAML. 该应用程序可正常运行,但在尝试配置Spring Security和SAML时启动失败。

Here are the dependencies in my POM 这是我的POM中的依赖项

<!-- as the server is a kntplatform project it will also include integrity, baseuser and kntcore libraries -->
<dependency>
    <groupId>com.kn.mik</groupId>
    <artifactId>GandE</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <!-- scope>provided</scope -->
    <!-- -->
</dependency>
<dependency>
    <groupId>com.kn.mik</groupId>
    <artifactId>GandE</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <classifier>sources</classifier>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>javax.xml</groupId>
    <artifactId>jaxrpc-api</artifactId>
    <version>1.1</version>
</dependency>

<!-- GWT itself -->

<dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-servlet</artifactId>
    <version>${gwtVersion}</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-user</artifactId>
    <version>${gwtVersion}</version>
    <scope>provided</scope>
</dependency>
<!-- needed for superdev mode -->
<dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-codeserver</artifactId>
    <version>${gwtVersion}</version>
    <scope>provided</scope>
</dependency>


<!-- Jquery for mobile -->
<dependency>
    <groupId>com.sksamuel.jqm4gwt</groupId>
    <!-- <artifactId>jqm4gwt-standalone</artifactId> -->
    <!-- artifactId>jqm4gwt-remote</artifactId -->
    <artifactId>jqm4gwt-library</artifactId>
    <version>${jqm4gwt.version}</version>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>com.sksamuel.jqm4gwt</groupId>
    <artifactId>jqm4gwt-datebox</artifactId>
    <version>${jqm4gwt.version}</version>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>com.sksamuel.jqm4gwt</groupId>
    <artifactId>jqm4gwt-datatables</artifactId>
    <version>${jqm4gwt.version}</version>
    <scope>compile</scope>
</dependency>

<!-- phonegap -->
<dependency>
    <groupId>com.googlecode.gwtphonegap</groupId>
    <artifactId>gwtphonegap</artifactId>
    <version>${gwtphonegap.version}</version>
    <scope>provided</scope>
</dependency>

<!-- testing -->
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.5</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.7.5</version>
</dependency>

<dependency>
    <groupId>org.springframework.security.extensions</groupId>
    <artifactId>spring-security-saml2-core</artifactId>
    <version>1.0.0.RELEASE</version>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>3.1.2.RELEASE</version>
    <scope>compile</scope>
</dependency>

This is my applicationContext.xml. 这是我的applicationContext.xml。 This is mainly taken from the sample in the spring-security-sample project here . 这主要来自此处的spring-security-sample项目的样本。

   <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.1.xsd
              http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
              http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">

    <!-- Enable auto-wiring -->
    <context:annotation-config />

    <!-- Get replaceable properties from application.properties -->
    <context:property-placeholder location="/WEB-INF/application.properties" />

    <!-- Scan for auto-wiring classes in spring saml packages -->
    <context:component-scan base-package="org.springframework.security.saml" />

    <!-- Secured pages with SAML as entry point -->
    <security:http authentication-manager-ref="authenticationManager" entry-point-ref="samlEntryPoint">
        <security:intercept-url pattern="/gandemobile/**" access="ROLE_USER" />
        <security:intercept-url pattern="/gwt/**" access="ROLE_USER" />
        <security:intercept-url pattern="/**/*.html" access="ROLE_USER" />
        <security:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
        <security:custom-filter after="BASIC_AUTH_FILTER" ref="samlFilter" />
    </security:http>

    <!-- Filters for processing of SAML messages -->
    <bean id="samlFilter" class="org.springframework.security.web.FilterChainProxy">
        <security:filter-chain-map request-matcher="ant">
            <security:filter-chain pattern="/saml/login/**" filters="samlEntryPoint" />
            <security:filter-chain pattern="/saml/logout/**" filters="samlLogoutFilter" />
            <security:filter-chain pattern="/saml/SSO/**" filters="samlWebSSOProcessingFilter" />
            <security:filter-chain pattern="/saml/SSOHoK/**" filters="samlWebSSOHoKProcessingFilter" />
            <security:filter-chain pattern="/saml/SingleLogout/**" filters="samlLogoutProcessingFilter" />
        </security:filter-chain-map>
    </bean>

    <!-- IDP Metadata configuration - paths to metadata of IDPs in circle of trust is here -->
    <bean id="metadata" class="org.springframework.security.saml.metadata.CachingMetadataManager">
        <constructor-arg>
            <list>
                <!-- Example of HTTP metadata without Extended Metadata -->
                <bean class="org.opensaml.saml2.metadata.provider.HTTPMetadataProvider">
                    <!-- URL containing the metadata -->
                    <constructor-arg>
                        <value type="java.lang.String">https://sso-int.int.kn/gate/idp/metadata</value>
                    </constructor-arg>
                    <!-- Timeout for metadata loading in ms -->
                    <constructor-arg>
                        <value type="int">15000</value>
                    </constructor-arg>
                    <property name="parserPool" ref="parserPool" />
                </bean>
            </list>
        </constructor-arg>
    </bean>

    <!-- Handler deciding where to redirect user after successful login -->
    <bean id="successRedirectHandler" class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler">
        <property name="defaultTargetUrl" value="${saml.successful.login.url}" />
    </bean>

    <!-- Use the following for interpreting RelayState coming from unsolicited response as redirect URL: -->
    <!-- <bean id="successRedirectHandler" class="org.springframework.security.saml.SAMLRelayStateSuccessHandler"> -->
    <!-- <property name="defaultTargetUrl" value="${saml.successful.login.url}" /> -->
    <!-- </bean> -->

    <!-- Handler for successful logout -->
    <bean id="successLogoutHandler" class="org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler">
        <property name="defaultTargetUrl" value="${saml.successful.logout.url}" />
    </bean>

    <!-- Register authentication manager with SAML provider -->
    <security:authentication-manager alias="authenticationManager">
        <!-- Register authentication manager for SAML provider -->
        <security:authentication-provider ref="samlAuthenticationProvider" />
    </security:authentication-manager>

    <!-- Logger for SAML messages and events -->
    <bean id="samlLogger" class="org.springframework.security.saml.log.SAMLDefaultLogger" />

    <!-- Central storage of cryptographic keys -->
    <bean id="keyManager" class="org.springframework.security.saml.key.JKSKeyManager">
        <constructor-arg value="${saml.keystore.file}" />
        <constructor-arg type="java.lang.String" value="${saml.keystore.password}" />
        <constructor-arg>
            <map>
                <entry key="${saml.keystore.alias}" value="${saml.keystore.password}" />
            </map>
        </constructor-arg>
        <constructor-arg type="java.lang.String" value="${saml.keystore.alias}" />
    </bean>

    <!-- Entry point to initialize authentication, default values taken from properties file -->
    <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 that extracts user details from successful login -->
    <bean id="samlUserDetailsService" class="com.kn.mik.mobile.gandemobile.client.security.SAMLUserDetailsServiceImpl" />

    <!-- SAML Authentication Provider responsible for validating of received SAML messages -->
    <bean id="samlAuthenticationProvider" class="org.springframework.security.saml.SAMLAuthenticationProvider">
        <property name="userDetails" ref="samlUserDetailsService" />
    </bean>

    <!-- Provider of default SAML Context -->
    <bean id="contextProvider" class="org.springframework.security.saml.context.SAMLContextProviderImpl" />

    <!-- Processing filter for WebSSO profile messages -->
    <bean id="samlWebSSOProcessingFilter" class="org.springframework.security.saml.SAMLProcessingFilter">
        <property name="authenticationManager" ref="authenticationManager" />
        <property name="authenticationSuccessHandler" ref="successRedirectHandler" />
        <property name="authenticationFailureHandler" ref="failureRedirectHandler" />
    </bean>

    <!-- Processing filter for WebSSO Holder-of-Key profile -->
    <bean id="samlWebSSOHoKProcessingFilter" class="org.springframework.security.saml.SAMLWebSSOHoKProcessingFilter">
        <property name="authenticationManager" ref="authenticationManager" />
        <property name="authenticationSuccessHandler" ref="successRedirectHandler" />
        <property name="authenticationFailureHandler" ref="failureRedirectHandler" />
    </bean>

    <!-- Logout handler terminating local session -->
    <bean id="logoutHandler" class="org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler">
        <property name="invalidateHttpSession" value="false" />
    </bean>

    <!-- Override default logout processing filter with the one processing SAML messages -->
    <bean id="samlLogoutFilter" class="org.springframework.security.saml.SAMLLogoutFilter">
        <constructor-arg ref="successLogoutHandler" />
        <constructor-arg ref="logoutHandler" />
        <constructor-arg ref="logoutHandler" />
    </bean>

    <!-- Filter processing incoming logout messages -->
    <!-- First argument determines URL user will be redirected to after successful global logout -->
    <bean id="samlLogoutProcessingFilter" class="org.springframework.security.saml.SAMLLogoutProcessingFilter">
        <constructor-arg ref="successLogoutHandler" />
        <constructor-arg ref="logoutHandler" />
    </bean>

    <!-- Class loading incoming SAML messages from httpRequest stream -->
    <bean id="processor" class="org.springframework.security.saml.processor.SAMLProcessorImpl">
        <constructor-arg>
            <list>
                <ref bean="redirectBinding" />
                <ref bean="postBinding" />
                <ref bean="artifactBinding" />
                <ref bean="soapBinding" />
                <ref bean="paosBinding" />
            </list>
        </constructor-arg>
    </bean>

    <!-- SAML 2.0 WebSSO Assertion Consumer -->
    <bean id="webSSOprofileConsumer" class="org.springframework.security.saml.websso.WebSSOProfileConsumerImpl" />

    <!-- SAML 2.0 Holder-of-Key WebSSO Assertion Consumer -->
    <bean id="hokWebSSOprofileConsumer" class="org.springframework.security.saml.websso.WebSSOProfileConsumerHoKImpl" />

    <!-- SAML 2.0 Web SSO profile -->
    <bean id="webSSOprofile" class="org.springframework.security.saml.websso.WebSSOProfileImpl" />

    <!-- SAML 2.0 Holder-of-Key Web SSO profile -->
    <bean id="hokWebSSOProfile" class="org.springframework.security.saml.websso.WebSSOProfileConsumerHoKImpl" />

    <!-- SAML 2.0 ECP profile -->
    <bean id="ecpprofile" class="org.springframework.security.saml.websso.WebSSOProfileECPImpl" />

    <!-- SAML 2.0 Logout Profile -->
    <bean id="logoutprofile" class="org.springframework.security.saml.websso.SingleLogoutProfileImpl" />

    <!-- Bindings, encoders and decoders used for creating and parsing messages -->
    <bean id="postBinding" class="org.springframework.security.saml.processor.HTTPPostBinding">
        <constructor-arg ref="parserPool" />
        <constructor-arg ref="velocityEngine" />
    </bean>

    <bean id="redirectBinding" class="org.springframework.security.saml.processor.HTTPRedirectDeflateBinding">
        <constructor-arg ref="parserPool" />
    </bean>

    <bean id="artifactBinding" class="org.springframework.security.saml.processor.HTTPArtifactBinding">
        <constructor-arg ref="parserPool" />
        <constructor-arg ref="velocityEngine" />
        <constructor-arg>
            <bean class="org.springframework.security.saml.websso.ArtifactResolutionProfileImpl">
                <constructor-arg>
                    <bean class="org.apache.commons.httpclient.HttpClient" />
                </constructor-arg>
                <property name="processor">
                    <bean id="soapProcessor" class="org.springframework.security.saml.processor.SAMLProcessorImpl">
                        <constructor-arg ref="soapBinding" />
                    </bean>
                </property>
            </bean>
        </constructor-arg>
    </bean>

    <bean id="soapBinding" class="org.springframework.security.saml.processor.HTTPSOAP11Binding">
        <constructor-arg ref="parserPool" />
    </bean>

    <bean id="paosBinding" class="org.springframework.security.saml.processor.HTTPPAOS11Binding">
        <constructor-arg ref="parserPool" />
    </bean>

    <!-- Initialization of OpenSAML library -->
    <bean class="org.springframework.security.saml.SAMLBootstrap" />

    <!-- Initialization of the velocity engine -->
    <bean id="velocityEngine" class="org.springframework.security.saml.util.VelocityFactory" factory-method="getEngine" />

    <!-- XML parser pool needed for OpenSAML parsing -->
    <bean id="parserPool" class="org.opensaml.xml.parse.StaticBasicParserPool" init-method="initialize">
        <property name="builderFeatures">
            <map>
                <entry key="http://apache.org/xml/features/dom/defer-node-expansion" value="false" />
            </map>
        </property>
    </bean>
    <bean id="parserPoolHolder" class="org.springframework.security.saml.parser.ParserPoolHolder" />

</beans>

And finally, the errors I get on startup. 最后,我在启动时遇到的错误。

        Runing CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.7, -bindAddress, 0.0.0.0, -launcherDir, C:\Development\knt\applications\mik\mobile\gande\target\GandEMobile-0.0.1-SNAPSHOT, -logLevel, INFO, com.kn.mik.mobile.gandemobile.Application]
    Super Dev Mode starting up
       workDir: C:\Development\knt\applications\mik\mobile\gande\target\gwttmp\gwt-codeserver-3406402710207305985.tmp
       Loading Java files in com.kn.mik.mobile.gandemobile.Application.
       Ignored 8 units with compilation errors in first pass.
    Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
    log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
    log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
    log4j:ERROR [sun.misc.Launcher$AppClassLoader@14dad5dc] whereas object of type 
    log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebAppClassLoader=1926174111@72cf159f].
    log4j:ERROR Could not instantiate appender named "stdout".
    log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
       Module setup completed in 8891 ms

    The code server is ready at http://MIK1550006L:9876/
    Code server started in 9663 ms
    Starting Jetty on port 8989
       [WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload{/,file:/C:/Development/knt/applications/mik/mobile/gande/target/GandEMobile-0.0.1-SNAPSHOT/},C:\Development\knt\applications\mik\mobile\gande\target\GandEMobile-0.0.1-SNAPSHOT
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.web.context.SecurityContextPersistenceFilter] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
        at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:541)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:282)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:740)
        at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:632)
        at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1054)
        at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
        at com.google.gwt.dev.DevMode.main(DevMode.java:413)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.web.context.SecurityContextPersistenceFilter] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:282)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:615)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1045)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:949)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
        ... 37 more
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(Constructo

rResolver.java:250)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1045)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:949)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)
    ... 51 more
waited 0 ms for code server to finish

I assume this is related to not matching versions of the spring security and saml modules. 我认为这与Spring Security和saml模块的版本不匹配有关。 Try: spring-security 4.0.3.RELEASE and spring-security-saml2 1.0.1.RELEASE Also add spring-security-core and spring-security-web dependencies. 尝试:spring-security 4.0.3.RELEASE和spring-security-saml2 1.0.1.RELEASE还添加spring-security-core和spring-security-web依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM