本文整理汇总了Java中org.apache.commons.configuration2.ConfigurationConverter类的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationConverter类的具体用法?Java ConfigurationConverter怎么用?Java ConfigurationConverter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConfigurationConverter类属于org.apache.commons.configuration2包,在下文中一共展示了ConfigurationConverter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.apache.commons.configuration2.ConfigurationConverter; //导入依赖的package包/类
/**
* The main method.
*
* @param args
* the arguments
*/
public static void main(String[] args)
{
System.out.println(getFiles(".", "z:\\dev\\yajsw\\..\\yajsw\\*.jar")
.size());
try
{
// String
// fileName=FilenameUtils.separatorsToSystem("C:\\init\\MOBILEguard\\yajsw/lib/jvmstat/*.jar");
// System.out.println("FileName: "+fileName);
CompositeConfiguration compConfig = new CompositeConfiguration();
AbstractConfiguration configuraton = new BaseConfiguration();
compConfig.addConfiguration(new EnvironmentConfiguration());
configuraton.setProperty("wrapper.java.classpath.1",
"${VERSANT_ROOT}/lib/jvi.*jar");
configuraton.setProperty("wrapper.java.classpath.2",
"${GROOVY_HOME}/lib/*.jar");
compConfig.addConfiguration(configuraton);
System.out.println("Configuration: "
+ ConfigurationConverter.getProperties(compConfig));
System.out.println("subset: "
+ ConfigurationConverter.getProperties(compConfig
.subset("wrapper.java")));
// Collection files=FileUtils.getFiles("../..",
// "C:/versant/7_0_1/lib/jvi*.jar");
// Collection collection=
// org.apache.commons.io.FileUtils.listFiles(new File("C:/"),
// new WildcardFileFilter("jvi*.jar"), new
// WildcardFileFilter("*jar"));
// File[] files= new
// File("C:").listFiles((FilenameFilter)FileFilterUtils.nameFileFilter("C:/versant/7_0_1/lib/jvi*.jar"));
//
// FileUtils.getFiles("C:/versant/7_0_1/lib/", "jvi*.jar");
// System.out.println("FileList="+
// FileUtils.getFiles("C:/versant/7_0_1/lib/", "jvi*.jar"));
// java.util.Arrays.asList(files));
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
示例2: Swagger2MarkupProperties
import org.apache.commons.configuration2.ConfigurationConverter; //导入依赖的package包/类
public Swagger2MarkupProperties(Properties properties) {
this(ConfigurationConverter.getConfiguration(properties));
}