|
|
@@ -1,7 +1,6 @@ |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.OpenApi.Models; |
|
|
|
|
|
|
|
namespace Samples.Redis.SqlServer |
|
|
|
{ |
|
|
@@ -17,13 +16,7 @@ namespace Samples.Redis.SqlServer |
|
|
|
public void ConfigureServices(IServiceCollection services) |
|
|
|
{ |
|
|
|
services.AddControllers(); |
|
|
|
|
|
|
|
services.AddSwaggerGen(c => |
|
|
|
{ |
|
|
|
c.SwaggerDoc("v1", new OpenApiInfo { Title = "Samples.Redis.SqlServer", Version = "v1" }); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
services.AddCap(options => |
|
|
|
{ |
|
|
|
options.UseRedis("redis-node-0:6379,password=cap"); |
|
|
@@ -34,9 +27,6 @@ namespace Samples.Redis.SqlServer |
|
|
|
|
|
|
|
public void Configure(IApplicationBuilder app) |
|
|
|
{ |
|
|
|
app.UseSwagger(); |
|
|
|
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Samples.Redis.SqlServer v1")); |
|
|
|
|
|
|
|
app.UseRouting(); |
|
|
|
app.UseEndpoints(endpoints => |
|
|
|
{ |
|
|
|