平安校园
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
690 B

  1. using SafeCampus.Core.Utils;
  2. namespace SafeCampus.Core;
  3. /// <summary>
  4. /// AppStartup启动类
  5. /// </summary>
  6. [AppStartup(99)]
  7. public class Startup : AppStartup
  8. {
  9. public void ConfigureServices(IServiceCollection services)
  10. {
  11. services.AddComponent<LoggingConsoleComponent>();//启动控制台日志格式化组件
  12. services.AddComponent<LoggingFileComponent>();//启动日志写入文件组件
  13. // 配置雪花Id算法机器码
  14. YitIdHelper.SetIdGenerator(new IdGeneratorOptions
  15. {
  16. WorkerId = 1// 取值范围0~63,默认1
  17. });
  18. }
  19. public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
  20. {
  21. }
  22. }