您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

26 行
629 B

  1. using System;
  2. using Microsoft.AspNetCore.Builder;
  3. using Microsoft.Extensions.DependencyInjection;
  4. namespace Sample.Kafka.MySql
  5. {
  6. public class Startup
  7. {
  8. public void ConfigureServices(IServiceCollection services)
  9. {
  10. services.AddCap(x =>
  11. {
  12. x.UseMySql("Server=localhost;Database=testcap;UserId=root;Password=123123;");
  13. x.UseKafka("localhost:9092");
  14. x.UseDashboard();
  15. });
  16. services.AddMvc();
  17. }
  18. public void Configure(IApplicationBuilder app)
  19. {
  20. app.UseMvc();
  21. }
  22. }
  23. }