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.
|
- using Microsoft.AspNetCore.Builder;
- using Microsoft.Extensions.DependencyInjection;
-
- namespace Sample.Kafka.MySql
- {
- public class Startup
- {
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddCap(x =>
- {
- x.UseMySql("Server=192.168.10.110;Database=testcap;UserId=root;Password=123123;");
- x.UseKafka("192.168.10.110:9092");
- x.UseDashboard();
-
- //x.UseDiscovery(d =>
- //{
- // d.DiscoveryServerHostName = "localhost";
- // d.DiscoveryServerPort = 8500;
- // d.CurrentNodeHostName = "localhost";
- // d.CurrentNodePort = 5820;
- // d.NodeName = "CAP 2号节点";
- //});
- });
-
- services.AddMvc();
- }
-
- public void Configure(IApplicationBuilder app)
- {
- app.UseMvc();
-
- app.UseCap();
- }
- }
- }
|