简体   繁体   English

春季安全性未定义名为“ parserPool”的bean

[英]No bean named 'parserPool' is defined spring security

while integrating Spring Security SAML Extension with sso getting No bean named 'parserPool' is defined spring security error 在将Spring Security SAML Extension与sso集成时,未定义名为“ parserPool”的bean没有定义Spring Security错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metadata' defined in ServletContext resource [/WEB-INF/spring-config/spring-security.xml]: Cannot create inner bean 'org.opensaml.saml2.metadata.provider.HTTPMetadataProvider#5b357e7c' of type [org.opensaml.saml2.metadata.provider.HTTPMetadataProvider] while setting constructor argument with key [0]; org.springframework.beans.factory.BeanCreationException:创建在ServletContext资源[/WEB-INF/spring-config/spring-security.xml]中定义的名称为“元数据”的bean时出错:无法创建内部bean'org.opensaml.saml2。使用键[0]设置构造函数参数时,类型为[org.opensaml.saml2.metadata.provider.HTTPMetadataProvider]的metadata.provider.HTTPMetadataProvider#5b357e7c'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.opensaml.saml2.metadata.provider.HTTPMetadataProvider#5b357e7c' defined in ServletContext resource [/WEB-INF/spring-config/spring-security.xml]: Cannot resolve reference to bean 'parserPool' while setting bean property 'parserPool'; 嵌套的异常是org.springframework.beans.factory.BeanCreationException:在ServletContext资源[/ WEB-INF / spring-config / spring-security中定义的名称为'org.opensaml.saml2.metadata.provider.HTTPMetadataProvider#5b357e7c'的bean创建时出错.xml]:设置bean属性“ parserPool”时无法解析对bean“ parserPool”的引用; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'parserPool' is defined 嵌套的异常是org.springframework.beans.factory.NoSuchBeanDefinitionException:未定义名为'parserPool'的bean

add

 @Bean(initMethod = "initialize")
 public StaticBasicParserPool parserPool() {
      return new StaticBasicParserPool();
 }

I don't do xml configuration but I guess you can easily translate this bean declaration. 我不进行xml配置,但我想您可以轻松转换此bean声明。

In xml just add the bean 在xml中,只需添加bean

<!-- 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>

暂无
暂无

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

相关问题 春季安全性没有定义名为“ CustomAuthenticationProvider”的bean - Spring security No bean named 'CustomAuthenticationProvider' is defined Spring Security-未定义名为“ springSecurityFilterChain”的Bean - Spring Security - No bean named 'springSecurityFilterChain' is defined Spring 4 Spring Security 3.2.2没有定义名为“ springSecurityFilterChain”的bean - Spring 4 Spring Security 3.2.2 No bean named 'springSecurityFilterChain' is defined 没有使用hibernate和Spring MVC定义名为&#39;myUserDetailsS​​ervice&#39;的bean - No bean named 'myUserDetailsService' is defined Spring Security with hibernate and Spring MVC “未定义名为&#39;springSecurityFilterChain&#39;的bean” Java Config Spring安全性 - “No bean named 'springSecurityFilterChain' is defined” Java Config Spring security java配置的春季安全性,未定义名为“ springSecurityFilterChain”的bean错误 - spring security with java config , No bean named 'springSecurityFilterChain' is defined error Spring Security:创建bean时出错/未定义bean - Spring Security: Error creating bean/No bean is defined spring session redis&#39;未定义名为&#39;springSessionRepositoryFilter&#39;的bean&#39; - spring session redis 'No bean named 'springSessionRepositoryFilter' is defined' MongoDB Spring - 没有定义名为&#39;mongoTemplate&#39;的bean - MongoDB Spring - No bean named 'mongoTemplate' is defined spring mvc没有定义名为&#39;springSecurityFilterChain&#39;的bean - spring mvc No bean named 'springSecurityFilterChain' is defined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM