change: 日常小调整.
This commit is contained in:
@@ -17,7 +17,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||||||
*/
|
*/
|
||||||
public abstract class AbstractConfiguration implements Configuration {
|
public abstract class AbstractConfiguration implements Configuration {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(AbstractConfiguration.class);
|
protected final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||||
protected final Map<String, String> valueMap = new LinkedHashMap<>(16);
|
protected final Map<String, String> valueMap = new LinkedHashMap<>(16);
|
||||||
private final Lock loadLock = new ReentrantLock();
|
private final Lock loadLock = new ReentrantLock();
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
package com.serliunx.ddns.config;
|
package com.serliunx.ddns.config;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -19,8 +16,6 @@ import java.util.Set;
|
|||||||
*/
|
*/
|
||||||
public class PropertiesConfiguration extends FileConfiguration {
|
public class PropertiesConfiguration extends FileConfiguration {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(PropertiesConfiguration.class);
|
|
||||||
|
|
||||||
private Properties properties;
|
private Properties properties;
|
||||||
|
|
||||||
public PropertiesConfiguration(String path) {
|
public PropertiesConfiguration(String path) {
|
||||||
@@ -42,13 +37,13 @@ public class PropertiesConfiguration extends FileConfiguration {
|
|||||||
// 载入配置信息
|
// 载入配置信息
|
||||||
load();
|
load();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error("配置文件读取出现异常 => {}", e.toString());
|
log.error("配置文件读取出现异常 => {}", e.toString());
|
||||||
}finally {
|
}finally {
|
||||||
if(inputStream != null){
|
if(inputStream != null){
|
||||||
try {
|
try {
|
||||||
inputStream.close();
|
inputStream.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error("配置文件资源释放出现异常 => {}", e.getMessage());
|
log.error("配置文件资源释放出现异常 => {}", e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import static com.serliunx.ddns.util.InstanceUtils.validateInstance;
|
|||||||
*/
|
*/
|
||||||
public abstract class AbstractInstanceContext implements InstanceContext, MultipleSourceInstanceContext {
|
public abstract class AbstractInstanceContext implements InstanceContext, MultipleSourceInstanceContext {
|
||||||
|
|
||||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
protected final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
private final Set<ListableInstanceFactory> listableInstanceFactories = new HashSet<>();
|
private final Set<ListableInstanceFactory> listableInstanceFactories = new HashSet<>();
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import static com.serliunx.ddns.constant.SystemConstants.XML_ROOT_INSTANCE_NAME;
|
|||||||
@JacksonXmlRootElement(localName = XML_ROOT_INSTANCE_NAME)
|
@JacksonXmlRootElement(localName = XML_ROOT_INSTANCE_NAME)
|
||||||
public abstract class AbstractInstance implements Instance {
|
public abstract class AbstractInstance implements Instance {
|
||||||
|
|
||||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
protected final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实例名称
|
* 实例名称
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ import static com.serliunx.ddns.constant.SystemConstants.XML_ROOT_INSTANCE_NAME;
|
|||||||
@JacksonXmlRootElement(localName = XML_ROOT_INSTANCE_NAME)
|
@JacksonXmlRootElement(localName = XML_ROOT_INSTANCE_NAME)
|
||||||
public class AliyunInstance extends AbstractInstance {
|
public class AliyunInstance extends AbstractInstance {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(AliyunInstance.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AccessKey ID
|
* AccessKey ID
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user