|
|
@@ -1,7 +1,4 @@ |
|
|
|
using System; |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using MongoDB.Driver; |
|
|
@@ -26,17 +23,16 @@ namespace Sample.RabbitMQ.MongoDB |
|
|
|
x.UseRabbitMQ("192.168.2.120"); |
|
|
|
x.UseDashboard(); |
|
|
|
}); |
|
|
|
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); |
|
|
|
services.AddControllers(); |
|
|
|
} |
|
|
|
|
|
|
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env) |
|
|
|
public void Configure(IApplicationBuilder app) |
|
|
|
{ |
|
|
|
if (env.IsDevelopment()) |
|
|
|
app.UseRouting(); |
|
|
|
app.UseEndpoints(endpoints => |
|
|
|
{ |
|
|
|
app.UseDeveloperExceptionPage(); |
|
|
|
} |
|
|
|
|
|
|
|
app.UseMvc(); |
|
|
|
endpoints.MapControllers(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |