This commit is contained in:
Looly 2023-04-23 12:45:16 +08:00
parent e7a7a477c3
commit e23e609c2f
14 changed files with 61 additions and 24 deletions

View File

@ -18,7 +18,7 @@ import org.dromara.hutool.db.DbRuntimeException;
import org.dromara.hutool.db.ds.AbstractDSFactory;
import org.dromara.hutool.db.ds.DSKeys;
import org.dromara.hutool.setting.Setting;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.props.Props;
import com.mchange.v2.c3p0.ComboPooledDataSource;
import javax.sql.DataSource;

View File

@ -16,7 +16,7 @@ import org.dromara.hutool.core.text.StrUtil;
import org.dromara.hutool.db.ds.AbstractDSFactory;
import org.dromara.hutool.db.ds.DSKeys;
import org.dromara.hutool.setting.Setting;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.props.Props;
import com.alibaba.druid.pool.DruidDataSource;
import javax.sql.DataSource;

View File

@ -16,7 +16,7 @@ import org.dromara.hutool.core.text.StrUtil;
import org.dromara.hutool.db.ds.AbstractDSFactory;
import org.dromara.hutool.db.ds.DSKeys;
import org.dromara.hutool.setting.Setting;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.props.Props;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;

View File

@ -14,7 +14,7 @@ package org.dromara.hutool.db.ds.pooled;
import org.dromara.hutool.core.io.IoUtil;
import org.dromara.hutool.core.map.MapUtil;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.props.Props;
import java.sql.Connection;
import java.sql.DriverManager;

View File

@ -18,7 +18,7 @@ import org.dromara.hutool.db.DbRuntimeException;
import org.dromara.hutool.db.dialect.DriverUtil;
import org.dromara.hutool.db.ds.DSKeys;
import org.dromara.hutool.setting.Setting;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.props.Props;
import java.sql.Connection;
import java.sql.DriverManager;

View File

@ -16,7 +16,7 @@ import org.dromara.hutool.core.text.StrUtil;
import org.dromara.hutool.db.ds.AbstractDSFactory;
import org.dromara.hutool.db.ds.DSKeys;
import org.dromara.hutool.setting.Setting;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.props.Props;
import org.apache.tomcat.jdbc.pool.DataSource;
import org.apache.tomcat.jdbc.pool.PoolProperties;

View File

@ -28,7 +28,7 @@ import org.dromara.hutool.core.text.StrUtil;
import org.dromara.hutool.core.util.CharUtil;
import org.dromara.hutool.core.util.CharsetUtil;
import org.dromara.hutool.log.StaticLog;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.props.Props;
import java.io.File;
import java.net.URL;

View File

@ -12,37 +12,74 @@
package org.dromara.hutool.setting;
import org.dromara.hutool.core.text.StrUtil;
import org.dromara.hutool.core.exceptions.HutoolException;
/**
* 设置异常
*
* @author xiaoleilu
* @author looly
*/
public class SettingException extends RuntimeException {
public class SettingException extends HutoolException {
private static final long serialVersionUID = 7941096116780378387L;
/**
* 构造
*
* @param e 异常
*/
public SettingException(final Throwable e) {
super(e);
}
/**
* 构造
*
* @param message 消息
*/
public SettingException(final String message) {
super(message);
}
/**
* 构造
*
* @param messageTemplate 消息模板
* @param params 参数
*/
public SettingException(final String messageTemplate, final Object... params) {
super(StrUtil.format(messageTemplate, params));
super(messageTemplate, params);
}
public SettingException(final String message, final Throwable throwable) {
super(message, throwable);
/**
* 构造
*
* @param message 消息
* @param cause 被包装的子异常
*/
public SettingException(final String message, final Throwable cause) {
super(message, cause);
}
public SettingException(final String message, final Throwable throwable, final boolean enableSuppression, final boolean writableStackTrace) {
super(message, throwable, enableSuppression, writableStackTrace);
/**
* 构造
*
* @param message 消息
* @param cause 被包装的子异常
* @param enableSuppression 是否启用抑制
* @param writableStackTrace 堆栈跟踪是否应该是可写的
*/
public SettingException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
public SettingException(final Throwable throwable, final String messageTemplate, final Object... params) {
super(StrUtil.format(messageTemplate, params), throwable);
/**
* 构造
*
* @param cause 被包装的子异常
* @param messageTemplate 消息模板
* @param params 参数
*/
public SettingException(final Throwable cause, final String messageTemplate, final Object... params) {
super(cause, messageTemplate, params);
}
}

View File

@ -10,7 +10,7 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.setting.dialect;
package org.dromara.hutool.setting.props;
import org.dromara.hutool.core.bean.BeanUtil;
import org.dromara.hutool.core.io.file.FileUtil;

View File

@ -10,7 +10,7 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.setting.dialect;
package org.dromara.hutool.setting.props;
import org.dromara.hutool.core.io.file.FileNameUtil;
import org.dromara.hutool.core.io.resource.NoResourceException;

View File

@ -16,4 +16,4 @@
* @author looly
*
*/
package org.dromara.hutool.setting.dialect;
package org.dromara.hutool.setting.props;

View File

@ -1,8 +1,8 @@
package org.dromara.hutool.setting;
import org.dromara.hutool.core.array.ArrayUtil;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.dialect.PropsUtil;
import org.dromara.hutool.setting.props.Props;
import org.dromara.hutool.setting.props.PropsUtil;
import lombok.Data;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

View File

@ -1,7 +1,7 @@
package org.dromara.hutool.setting;
import org.dromara.hutool.core.date.DateUtil;
import org.dromara.hutool.setting.dialect.Props;
import org.dromara.hutool.setting.props.Props;
import lombok.Data;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;

View File

@ -1,6 +1,6 @@
package org.dromara.hutool.setting;
import org.dromara.hutool.setting.dialect.PropsUtil;
import org.dromara.hutool.setting.props.PropsUtil;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;