平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 1 месец
пре 4 месеци
1234567891011121314151617181920212223242526
  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. }