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.
 
 
 

30 line
757 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.AddControllers();
  17. }
  18. public void Configure(IApplicationBuilder app)
  19. {
  20. app.UseRouting();
  21. app.UseEndpoints(endpoints =>
  22. {
  23. endpoints.MapControllers();
  24. });
  25. }
  26. }
  27. }