[英]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.