优化配置文件查询

This commit is contained in:
不做码农
2022-02-23 18:30:17 +08:00
parent 3981fa2303
commit e98bde7ad5
13 changed files with 121 additions and 24 deletions

View File

@@ -71,8 +71,9 @@ namespace ZR.Admin.WebApi.Framework
/// <returns></returns>
public static TokenValidationParameters ValidParameters()
{
JwtSettings jwtSettings = new JwtSettings();
ConfigUtils.Instance.Bind("JwtSettings", jwtSettings);
JwtSettings jwtSettings = new();
AppSettings.Bind("JwtSettings", jwtSettings);
if (jwtSettings == null || jwtSettings.SecretKey.IsEmpty())
{
throw new Exception("JwtSettings获取失败");