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 696 B

5 years ago
5 years ago
1234567891011121314151617181920212223242526272829
  1. using Microsoft.AspNetCore.Builder;
  2. using Microsoft.Extensions.DependencyInjection;
  3. namespace Sample.Kafka.InMemory
  4. {
  5. public class Startup
  6. {
  7. public void ConfigureServices(IServiceCollection services)
  8. {
  9. services.AddCap(x =>
  10. {
  11. x.UseInMemoryStorage();
  12. x.UseKafka("192.168.2.120:9093");
  13. x.UseDashboard();
  14. });
  15. services.AddControllers();
  16. }
  17. public void Configure(IApplicationBuilder app)
  18. {
  19. app.UseRouting();
  20. app.UseEndpoints(endpoints =>
  21. {
  22. endpoints.MapControllers();
  23. });
  24. }
  25. }
  26. }