diff --git a/OshimaWebAPI/Controllers/FunGameController.cs b/OshimaWebAPI/Controllers/FunGameController.cs index 9f2cafe..8c0a613 100644 --- a/OshimaWebAPI/Controllers/FunGameController.cs +++ b/OshimaWebAPI/Controllers/FunGameController.cs @@ -1,6 +1,5 @@ using System.Text; using System.Text.RegularExpressions; -using System.Xml.Linq; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; diff --git a/OshimaWebAPI/OshimaWebAPI.cs b/OshimaWebAPI/OshimaWebAPI.cs index ca43db3..1f80334 100644 --- a/OshimaWebAPI/OshimaWebAPI.cs +++ b/OshimaWebAPI/OshimaWebAPI.cs @@ -237,7 +237,7 @@ namespace Oshima.FunGame.WebAPI if (objs.Length > 0 && objs[0] is WebApplication app) { _serviceScopeFactory = app.Services.GetRequiredService(); - Controller.WriteLine("获取到:IServiceScopeFactory"); + if (_serviceScopeFactory != null) Controller.WriteLine("获取到:IServiceScopeFactory"); } }