Closed gmf520 closed 4 years ago
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
当前Pack加载的方式是框架启动时自动搜索加载的dll,找到所有OsharpPack的实现类型,然后按一定的顺序自动执行各个Pack的AddService添加服务和UsePack执行Pack的初始化。 自动加载带来如下问题:
A clear and concise description of what you want to happen.
Startup.cs中,原先为:
public void ConfigureServices(IServiceCollection services) { services.AddOSharp(); }
更新后:
public void ConfigureServices(IServiceCollection services) { services.AddOSharp() .AddPack<Log4NetPack>() .AddPack<AutoMapperPack>() .AddPack<EndpointsPack>() .AddPack<SwaggerPack>() .AddPack<RedisPack>() .AddPack<AuthenticationPack>() .AddPack<FunctionAuthorizationPack>() .AddPack<DataAuthorizationPack>() .AddPack<MySqlDefaultDbContextMigrationPack>(); }
96bf9f88776e248ac2a7837e4d3f2b98f2b7d960
您的功能请求与现有问题有关吗?请描述
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
当前Pack加载的方式是框架启动时自动搜索加载的dll,找到所有OsharpPack的实现类型,然后按一定的顺序自动执行各个Pack的AddService添加服务和UsePack执行Pack的初始化。 自动加载带来如下问题:
描述您想要的解决方案
A clear and concise description of what you want to happen.
代码影响:
Startup.cs中,原先为:
更新后: