当前位置: 首页>>代码示例>>Java>>正文


Java StaticBasicParserPool类代码示例

本文整理汇总了Java中org.opensaml.xml.parse.StaticBasicParserPool的典型用法代码示例。如果您正苦于以下问题:Java StaticBasicParserPool类的具体用法?Java StaticBasicParserPool怎么用?Java StaticBasicParserPool使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StaticBasicParserPool类属于org.opensaml.xml.parse包,在下文中一共展示了StaticBasicParserPool类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parserPool

import org.opensaml.xml.parse.StaticBasicParserPool; //导入依赖的package包/类
@Bean(initMethod = "initialize")
public StaticBasicParserPool parserPool() {
    StaticBasicParserPool staticBasicParserPool = new StaticBasicParserPool();

    // https://github.com/spring-projects/spring-security-saml/commit/925c8925fa0d0645d7b177b6e65cfb920fc6782f
    // org.opensaml.xml.encryption.Decrypter.buildParserPool()
    // Even though most of these are default, let's just define them so
    // there's a little smaller change of screwing things up if any new features are introduced later.

    Map<String, Boolean> features = new HashMap<>();

    staticBasicParserPool.setNamespaceAware(true);
    features.put("http://apache.org/xml/features/dom/defer-node-expansion", Boolean.FALSE);
    staticBasicParserPool.setExpandEntityReferences(false);
    features.put(XMLConstants.FEATURE_SECURE_PROCESSING, true);
    features.put("http://apache.org/xml/features/disallow-doctype-decl", true);

    staticBasicParserPool.setBuilderFeatures(features);
    return staticBasicParserPool;
}
 
开发者ID:solita,项目名称:kansalaisaloite,代码行数:21,代码来源:WebSecurityConfig.java

示例2: staticBasicParserPool

import org.opensaml.xml.parse.StaticBasicParserPool; //导入依赖的package包/类
private StaticBasicParserPool staticBasicParserPool() {
	StaticBasicParserPool parserPool = new StaticBasicParserPool();
	try {
		parserPool.initialize();
	} catch (XMLParserException e) {
		e.printStackTrace();
	}
	return parserPool;
}
 
开发者ID:spring-projects,项目名称:spring-security-saml-dsl,代码行数:10,代码来源:SAMLConfigurer.java

示例3: parserPool

import org.opensaml.xml.parse.StaticBasicParserPool; //导入依赖的package包/类
@Bean(initMethod = "initialize")
public StaticBasicParserPool parserPool() {
    return new StaticBasicParserPool();
}
 
开发者ID:jadekler,项目名称:git-java-okta-saml-example,代码行数:5,代码来源:SAMLConfiguration.java

示例4: parserPool

import org.opensaml.xml.parse.StaticBasicParserPool; //导入依赖的package包/类
@Bean(initMethod = "initialize")
@ConditionalOnMissingBean
public ParserPool parserPool() {
    return new StaticBasicParserPool();
}
 
开发者ID:ulisesbocchio,项目名称:spring-boot-security-saml,代码行数:6,代码来源:SAMLServiceProviderSecurityConfiguration.java

示例5: initializeParserPool

import org.opensaml.xml.parse.StaticBasicParserPool; //导入依赖的package包/类
/**
 * Initializes the default global parser pool instance.
 * 
 * <p>
 * The ParserPool configured by default here is an instance of
 * {@link StaticBasicParserPool}, with a maxPoolSize property of 50 
 * and all other properties with default values.
 * </p>
 * 
 * <p>
 * If a deployment wishes to use a different parser pool implementation,
 * or one configured with different characteristics, they may either override this method,
 * or simply configure a different ParserPool after bootstrapping via 
 * {@link Configuration#setParserPool(org.opensaml.xml.parse.ParserPool)}.
 * </p>
 * 
 * @throws ConfigurationException thrown if there is a problem initializing the parser pool
 */
protected static void initializeParserPool() throws ConfigurationException {
    StaticBasicParserPool pp = new StaticBasicParserPool();
    pp.setMaxPoolSize(50);
    try {
        pp.initialize();
    } catch (XMLParserException e) {
        throw new ConfigurationException("Error initializing parser pool", e);
    }
    Configuration.setParserPool(pp);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:DefaultBootstrap.java


注:本文中的org.opensaml.xml.parse.StaticBasicParserPool类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。