This commit is contained in:
Looly 2022-04-30 20:59:02 +08:00
parent 5a33a8320e
commit 9a1ffb25ff
3 changed files with 14 additions and 3 deletions

View File

@ -17,6 +17,7 @@ public class ModifierUtilTest {
ModifierUtil.ModifierType.STATIC)
);
}
private static void ddd() {
}
}

View File

@ -1,5 +1,8 @@
package cn.hutool.db.ds.simple;
import cn.hutool.core.clone.CloneRuntimeException;
import javax.sql.DataSource;
import java.io.Closeable;
import java.io.PrintWriter;
import java.sql.DriverManager;
@ -7,8 +10,6 @@ import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.logging.Logger;
import javax.sql.DataSource;
/**
* 数据源抽象实现
* @author Looly
@ -53,4 +54,13 @@ public abstract class AbstractDataSource implements DataSource, Cloneable, Close
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
throw new SQLFeatureNotSupportedException("DataSource can't support getParentLogger method!");
}
@Override
public AbstractDataSource clone() {
try {
return (AbstractDataSource) super.clone();
} catch (final CloneNotSupportedException e) {
throw new CloneRuntimeException(e);
}
}
}

View File

@ -8,7 +8,7 @@ key = value
#中括表示一个分组其下面的所有属性归属于这个分组在此分组名为demo也可以没有分组
#分组后的键值对在Setting对象中表现形式是demo.key也可以使用相应的方法取值
[demo]=
[demo]
# 类似于Properties的键值对
key = value
# 支持变量替换在new Setting的时候需要设置isUseVariable为true