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.

Startup.cs 656 B

6 vuotta sitten
6 vuotta sitten
12345678910111213141516171819202122232425262728
  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. app.UseCap();
  22. }
  23. }
  24. }