本文整理汇总了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;
}
示例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;
}
示例3: parserPool
import org.opensaml.xml.parse.StaticBasicParserPool; //导入依赖的package包/类
@Bean(initMethod = "initialize")
public StaticBasicParserPool parserPool() {
return new StaticBasicParserPool();
}
示例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);
}