- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.<init>()
方法的一些代码示例,展示了XMLConfigService.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLConfigService.<init>()
方法的具体详情如下:
包路径:org.springframework.extensions.config.xml.XMLConfigService
类名称:XMLConfigService
方法名:<init>
[英]Constructs an XMLConfigService using the given config source
[中]使用给定的配置源构造XMLConfigService
代码示例来源:origin: deas/alfresco
protected XMLConfigService initXMLConfigService(List<String> xmlConfigFilenames)
{
List<String> configFiles = new ArrayList<String>();
for (String filename : xmlConfigFilenames)
{
String path = getResourcesDir() + filename;
assertFileIsValid(path);
configFiles.add(path);
}
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.initConfig();
return svc;
}
}
代码示例来源:origin: deas/alfresco
/**
* Tests the use of the HTTP source config
*
* TODO: Enable this test when we have an HTTP config resource to load!
*/
public void xtestHTTPSource()
{
List<String> configFile = new ArrayList<String>(1);
configFile.add("http://localhost:8080/configservice/config-http.xml");
XMLConfigService svc = new XMLConfigService(new HTTPConfigSource(configFile));
svc.initConfig();
Config config = svc.getGlobalConfig();
assertNotNull(config);
}
代码示例来源:origin: deas/alfresco
protected XMLConfigService initXMLConfigService(List<String> xmlConfigFilenames)
{
List<String> configFiles = new ArrayList<String>();
for (String filename : xmlConfigFilenames)
{
// if we load from classpath then no need to prepend the resources dir (which will be .equals("classpath:")
String path = ((loadFromClasspath) ? "" : getResourcesDir()) + filename;
assertFileIsValid(path);
configFiles.add(path);
}
ConfigSource configSource = (loadFromClasspath) ? new ClassPathConfigSource(configFiles) : new FileConfigSource(configFiles);
XMLConfigService svc = new XMLConfigService(configSource);
svc.initConfig();
return svc;
}
}
代码示例来源:origin: deas/alfresco
protected XMLConfigService initXMLConfigService(String xmlConfigFile)
{
String fullFileName = getResourcesDir() + xmlConfigFile;
assertFileIsValid(fullFileName);
XMLConfigService svc = new XMLConfigService(new FileConfigSource(
fullFileName));
svc.initConfig();
return svc;
}
代码示例来源:origin: deas/alfresco
/**
* Loads a config file from filesystem or classpath
*
* In case of file resource, just provide the file name relative to resourceDir
* In case of classpath resources, just provide the resource URI, without with the prepending classpath: string
* @param xmlConfigFile
* @return
*/
protected XMLConfigService initXMLConfigService(String xmlConfigFile)
{
XMLConfigService svc = null;
if(loadFromClasspath)
{
svc = new XMLConfigService(new ClassPathConfigSource(xmlConfigFile));
}
else
{
String fullFileName = getResourcesDir() + xmlConfigFile;
assertFileIsValid(fullFileName);
svc = new XMLConfigService(new FileConfigSource(fullFileName));
}
svc.initConfig();
return svc;
}
代码示例来源:origin: deas/alfresco
/**
* Tests the use of the class path source config
*
* TODO: Enable this test when we have a classpath config resource to load!
*/
public void xtestClasspathSource()
{
String configFile = "org/configservice/config-classpath.xml";
XMLConfigService svc = new XMLConfigService(new ClassPathConfigSource(configFile));
svc.initConfig();
Config config = svc.getGlobalConfig();
assertNotNull(config);
}
代码示例来源:origin: deas/alfresco
configFiles.add("jar:*!/META-INF/web-client-config-custom.xml");
UrlConfigSource configSrc = new UrlConfigSource(configFiles, true);
XMLConfigService svc = new XMLConfigService(configSrc);
svc.initConfig();
代码示例来源:origin: deas/alfresco
XMLConfigService svc = new XMLConfigService(new UrlConfigSource(configFile, true));
svc.initConfig();
svc = new XMLConfigService(new UrlConfigSource(configFile, true));
svc.initConfig();
svc = new XMLConfigService(new UrlConfigSource(configFile, true));
svc.initConfig();
代码示例来源:origin: deas/alfresco
/**
* Tests the config service's ability to reset
*/
public void testReset()
{
// setup the config service
String configFile = getResourcesDir() + "config.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile));
svc.initConfig();
// try and get the global item
Config unitTest = svc.getConfig("Unit Test");
assertNotNull("unitTest should not be null", unitTest);
// reset the config service then try to retrieve some config again
svc.reset();
unitTest = svc.getConfig("Unit Test");
assertNotNull("unitTest should not be null", unitTest);
}
代码示例来源:origin: deas/alfresco
configFiles.add(getResourcesDir() + "config.xml");
configFiles.add(getResourcesDir() + "config-multi.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.initConfig();
代码示例来源:origin: deas/alfresco
configFiles.add(getResourcesDir() + "config.xml");
configFiles.add(getResourcesDir() + "config-areas.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.initConfig();
代码示例来源:origin: deas/alfresco
/**
* Tests loading config from a known JAR file
*/
public void testJarSource()
{
String resDir = this.getResourcesDir();
String jarFile = "jar:file:" + resDir + "custom-config.jar!/META-INF/web-client-config-custom.xml";
JarConfigSource source = new JarConfigSource(jarFile);
XMLConfigService svc = new XMLConfigService(source);
svc.initConfig();
// make sure the global config is present
Config config = svc.getGlobalConfig();
assertNotNull(config);
// make sure the from address is present and correct
ConfigElement clientElem = config.getConfigElement("client");
assertNotNull(clientElem);
ConfigElement fromAddressElem = clientElem.getChild("from-email-address");
assertNotNull(fromAddressElem);
String fromAddress = fromAddressElem.getValue();
assertEquals("From address should be 'me@somewhere.net'", "me@somewhere.net", fromAddress);
}
代码示例来源:origin: deas/alfresco
configFiles.add(getResourcesDir() + "config.xml");
configFiles.add(getResourcesDir() + "config-replace.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.initConfig();
代码示例来源:origin: deas/alfresco
configFiles.add(getResourcesDir() + "config.xml");
configFiles.add(getResourcesDir() + "config-multi.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.initConfig();
代码示例来源:origin: deas/alfresco
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile));
svc.initConfig();
代码示例来源:origin: deas/alfresco
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile));
svc.initConfig();
代码示例来源:origin: deas/alfresco
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile));
svc.setProperties(new Resource[] {new FileSystemResource(getResourcesDir() + "config-props.properties")});
svc.init();
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.parseConfigElement()方法的一些代码示例,展
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.getConfigElementReader()方法的一些代码
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.getElementReaders()方法的一些代码示例,展示
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.getSectionsByArea()方法的一些代码示例,展示
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.getSections()方法的一些代码示例,展示了XMLCo
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.createEvaluator()方法的一些代码示例,展示了X
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.getGlobalConfig()方法的一些代码示例,展示了X
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.parse()方法的一些代码示例,展示了XMLConfigSe
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.addConfigElementReader()方法的一些代码
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.()方法的一些代码示例,展示了XMLConfigService
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.parseElementReadersElement()方法的
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.addEvaluator()方法的一些代码示例,展示了XMLC
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.removeElementReaders()方法的一些代码示例
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.addConfigSection()方法的一些代码示例,展示了
本文整理了Java中org.springframework.extensions.config.xml.XMLConfigService.parseFragment()方法的一些代码示例,展示了XML
我是一名优秀的程序员,十分优秀!