优化配置文件查询
This commit is contained in:
@@ -8,10 +8,10 @@ namespace ZR.Common
|
||||
{
|
||||
public class AliyunOssHelper
|
||||
{
|
||||
static string accessKeyId = ConfigUtils.Instance.GetConfig("ALIYUN_OSS:KEY");
|
||||
static string accessKeySecret = ConfigUtils.Instance.GetConfig("ALIYUN_OSS:SECRET");
|
||||
static string endpoint = ConfigUtils.Instance.GetConfig("ALIYUN_OSS:REGIONID");
|
||||
static string bucketName1 = ConfigUtils.Instance.GetConfig("ALIYUN_OSS:bucketName");
|
||||
static string accessKeyId = AppSettings.GetConfig("ALIYUN_OSS:KEY");
|
||||
static string accessKeySecret = AppSettings.GetConfig("ALIYUN_OSS:SECRET");
|
||||
static string endpoint = AppSettings.GetConfig("ALIYUN_OSS:REGIONID");
|
||||
static string bucketName1 = AppSettings.GetConfig("ALIYUN_OSS:bucketName");
|
||||
|
||||
/// <summary>
|
||||
/// 上传到阿里云
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace ZR.Common.Cache
|
||||
|
||||
public static void Initalize()
|
||||
{
|
||||
Cache = new CSRedisClient(ConfigUtils.Instance.GetConfig("RedisServer:Cache"));
|
||||
Session = new CSRedisClient(ConfigUtils.Instance.GetConfig("RedisServer:Session"));
|
||||
Cache = new CSRedisClient(AppSettings.GetConfig("RedisServer:Cache"));
|
||||
Session = new CSRedisClient(AppSettings.GetConfig("RedisServer:Session"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace ZR.Common
|
||||
|
||||
public MailHelper()
|
||||
{
|
||||
ConfigUtils.Instance.Bind("MailOptions", mailOptions);
|
||||
AppSettings.Bind("MailOptions", mailOptions);
|
||||
FromEmail = mailOptions.From;
|
||||
Smtp = mailOptions.Smtp;
|
||||
FromPwd = mailOptions.Password;
|
||||
|
||||
Reference in New Issue
Block a user