mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
change paths
This commit is contained in:
@@ -11,6 +11,8 @@ import cn.hutool.core.io.IORuntimeException;
|
||||
public enum GlobalMailAccount {
|
||||
INSTANCE;
|
||||
|
||||
private static final String[] MAIL_SETTING_PATHS = new String[]{"config/mail.setting", "config/mailAccount.setting", "mail.setting"};
|
||||
|
||||
private final MailAccount mailAccount;
|
||||
|
||||
/**
|
||||
@@ -35,7 +37,7 @@ public enum GlobalMailAccount {
|
||||
* @return MailAccount
|
||||
*/
|
||||
private MailAccount createDefaultAccount() {
|
||||
for (String mailSettingPath : MailAccount.MAIL_SETTING_PATHS) {
|
||||
for (String mailSettingPath : MAIL_SETTING_PATHS) {
|
||||
try {
|
||||
return new MailAccount(mailSettingPath);
|
||||
} catch (IORuntimeException ignore) {
|
||||
|
@@ -37,6 +37,10 @@ public class MailAccount implements Serializable {
|
||||
private static final String MAIL_DEBUG = "mail.debug";
|
||||
private static final String SPLIT_LONG_PARAMS = "mail.mime.splitlongparameters";
|
||||
|
||||
/**
|
||||
* @deprecated 此公共配置没有公开必要,迁移至GlobalMailAccount#MAIL_SETTING_PATHS
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String[] MAIL_SETTING_PATHS = new String[]{"config/mail.setting", "config/mailAccount.setting", "mail.setting"};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user