本文整理汇总了Java中org.apache.commons.configuration2.PropertiesConfiguration.getString方法的典型用法代码示例。如果您正苦于以下问题:Java PropertiesConfiguration.getString方法的具体用法?Java PropertiesConfiguration.getString怎么用?Java PropertiesConfiguration.getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.configuration2.PropertiesConfiguration
的用法示例。
在下文中一共展示了PropertiesConfiguration.getString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.apache.commons.configuration2.PropertiesConfiguration; //导入方法依赖的package包/类
public static void main(String[] args) throws IOException {
PropertiesConfiguration config = PropertiesHolder.getInstance();
String outputFolderPath = config.getString("output.folder");
File storeDir = new File(outputFolderPath + File.separator + "graph-db");
ServerBootstrapper serverBootstrapper = new CommunityBootstrapper();
serverBootstrapper.start(
storeDir,
Optional.empty(), // omit configfile, properties follow
Pair.of("dbms.connector.http.address","127.0.0.1:7474"),
Pair.of("dbms.connector.http.enabled", "true"),
Pair.of("dbms.connector.bolt.enabled", "true"),
// allow the shell connections via port 1337 (default)
Pair.of("dbms.shell.enabled", "true"),
Pair.of("dbms.shell.host", "127.0.0.1"),
Pair.of("dbms.shell.port", "1337"),
Pair.of("dbms.security.auth_enabled", "false")
);
// ^^ serverBootstrapper.start() also registered shutdown hook!
NeoServer neoServer = serverBootstrapper.getServer();
System.out.println("Press ENTER to quit.");
System.in.read();
neoServer.stop();
}
示例2: ImportCommandGenerator
import org.apache.commons.configuration2.PropertiesConfiguration; //导入方法依赖的package包/类
public ImportCommandGenerator() {
PropertiesConfiguration config = PropertiesHolder.getInstance();
this.inputFolderPath = config.getString("output.folder");
this.outputFolderPath = config.getString("output.folder") + File.separator + "graph-db" + File.separator + "data" + File.separator +"databases" + File.separator + "graph.db";
this.neoTypeToManualFiles = getNeoTypeToManualFiles(config);
}
示例3: getNeoTypeToManualFiles
import org.apache.commons.configuration2.PropertiesConfiguration; //导入方法依赖的package包/类
private Multimap<String, String> getNeoTypeToManualFiles(PropertiesConfiguration config) {
Multimap<String,String> result = HashMultimap.create();
Iterator<String> keys = config.getKeys("manualUpload");
while (keys.hasNext()) {
String key = keys.next();
String propertyValue = config.getString(key);
if (StringUtils.isNotEmpty(propertyValue)) {
String[] split = propertyValue.split(COMMA);
for (String s : split) {
result.put(StringUtils.remove(key, "manualUpload."), s);
}
}
}
return result;
}
示例4: HeaderGenerator
import org.apache.commons.configuration2.PropertiesConfiguration; //导入方法依赖的package包/类
public HeaderGenerator() {
PropertiesConfiguration config = PropertiesHolder.getInstance();
this.outputFolder = config.getString("output.folder");
}
示例5: FileUnion
import org.apache.commons.configuration2.PropertiesConfiguration; //导入方法依赖的package包/类
public FileUnion() {
PropertiesConfiguration config = PropertiesHolder.getInstance();
this.inputFolder = config.getString("output.folder");
this.outputFolder = config.getString("output.folder");
}