using Microsoft.AspNetCore.Hosting;
using Znyc.Recruitment.Admin.Commons.Core.App;
//通过HostingStartup指定要启动的类型
[assembly: HostingStartup(typeof(HostingStartup))]
namespace Znyc.Recruitment.Admin.Commons.Core.App
{
///
/// 配置程序启动时自动注入
///
public sealed class HostingStartup : IHostingStartup
{
///
/// 配置应用启动
///
///
public void Configure(IWebHostBuilder builder)
{
//可以添加配置
builder.ConfigureAppConfiguration((hostingContext, config) =>
{
// 自动装载配置
App.AddConfigureFiles(config, hostingContext.HostingEnvironment);
});
//可以添加ConfigureServices
// 自动注入 AddApp() 服务
builder.ConfigureServices(services => { });
}
}
}