- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中codecrafter47.bungeetablistplus.yamlconfig.YamlConfig.read()
方法的一些代码示例,展示了YamlConfig.read()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlConfig.read()
方法的具体详情如下:
包路径:codecrafter47.bungeetablistplus.yamlconfig.YamlConfig
类名称:YamlConfig
方法名:read
暂无
代码示例来源:origin: CodeCrafter47/BungeeTabListPlus
public static <T> T read(InputStream is, Class<T> type) {
return read(new UnicodeReader(is), type);
}
代码示例来源:origin: CodeCrafter47/BungeeTabListPlus
public boolean loadTabLists() {
File tablistFolder = new File(plugin.getPlugin().getDataFolder(), "tabLists");
if (!tablistFolder.exists()) {
tablistFolder.mkdirs();
try {
FileOutputStream outputStream = new FileOutputStream(new File(tablistFolder, "default.yml"));
ByteStreams.copy(getClass().getClassLoader().getResourceAsStream("default.yml"), outputStream);
outputStream.close();
} catch (IOException e) {
plugin.getLogger().log(Level.WARNING, "Failed to save default config.", e);
}
}
for (File file : tablistFolder.listFiles()) {
if (file.isFile() && file.getName().endsWith(".yml")) {
try {
plugin.getLogger().log(Level.INFO, "Loading {0}", file.getName());
ITabListConfig tabListConfig = Objects.requireNonNull(YamlConfig.read(new FileInputStream(file), ITabListConfig.class));
if (tabListConfig instanceof UnsupportedConfig) {
plugin.getLogger().log(Level.WARNING, "Failed to load {0}. Still using the old format? https://github.com/CodeCrafter47/BungeeTabListPlus/wiki/Updating", file.getName());
} else {
configs.add((Config) tabListConfig);
}
} catch (Throwable ex) {
plugin.getLogger().log(Level.WARNING, "Failed to load " + file.getName(), ex);
}
}
}
return true;
}
代码示例来源:origin: CodeCrafter47/BungeeTabListPlus
config = YamlConfig.read(new FileInputStream(file), MainConfig.class);
if (config.needWrite) {
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8));
代码示例来源:origin: CodeCrafter47/BungeeTabListPlus
"See https://github.com/CodeCrafter47/BungeeTabListPlus/wiki for additional information");
} else {
config = YamlConfig.read(new FileInputStream(file), MainConfig.class);
if (config.needWrite) {
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8));
本文整理了Java中us.codecraft.webmagic.processor.example.ZhihuPageProcessor类的一些代码示例,展示了ZhihuPageProcessor类的
本文整理了Java中us.codecraft.webmagic.processor.example.ZhihuPageProcessor.()方法的一些代码示例,展示了ZhihuPageProcess
我在 android studio 中构建 gradle 时遇到错误。 apply plugin: 'com.android.application' android { compileSdk
我是一名优秀的程序员,十分优秀!