From 0be42915ac1ef506d781b4bdafbbc6747c24d977 Mon Sep 17 00:00:00 2001 From: wangyuewei Date: Fri, 5 Feb 2021 23:41:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APIJSON.NET/APIJSON.NET/Startup.cs | 1 + APIJSON.NET/APIJSON.NET/appsettings.json | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/APIJSON.NET/APIJSON.NET/Startup.cs b/APIJSON.NET/APIJSON.NET/Startup.cs index 756a23c..dada517 100644 --- a/APIJSON.NET/APIJSON.NET/Startup.cs +++ b/APIJSON.NET/APIJSON.NET/Startup.cs @@ -74,6 +74,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseAuthentication(); app.UseRouting(); + app.UseAuthorization(); app.UseStaticFiles(); app.UseCors(_defaultCorsPolicyName); app.UseSwagger(); diff --git a/APIJSON.NET/APIJSON.NET/appsettings.json b/APIJSON.NET/APIJSON.NET/appsettings.json index 610c96b..8a1ec81 100644 --- a/APIJSON.NET/APIJSON.NET/appsettings.json +++ b/APIJSON.NET/APIJSON.NET/appsettings.json @@ -1,10 +1,10 @@ { "ConnectionStrings": { - "DbType": 0, //0:MySql,1:SqlServer,2:Sqlite - "ConnectionString": "Server=192.168.2.25;Database=yunwei;Uid=root;Pwd=xmjk;Port=3306;Character Set=utf8;" + "DbType": 1, //0:MySql,1:SqlServer,2:Sqlite + "ConnectionString": "Server=.;Database=Test;Uid=sa;Pwd=sa;" //"ConnectionString": "Server=119.29.9.25;Port=3306;Database=test;Uid=root;Pwd=1q,2w.3e?;CharSet=UTF8;" }, - "CorsUrls": "http://localhost:5000,http://localhost5001", + "CorsUrls": "http://localhost:5000,http://localhost:5001", "Authentication": { "JwtBearer": { "IsEnabled": "true", From ca451f6777a7a870de9794bc74bf74419a4c6c58 Mon Sep 17 00:00:00 2001 From: wangyuewei Date: Sun, 7 Feb 2021 08:33:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\263\250\346\204\217.txt" | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 "\346\263\250\346\204\217.txt" diff --git "a/\346\263\250\346\204\217.txt" "b/\346\263\250\346\204\217.txt" new file mode 100644 index 0000000..19b472a --- /dev/null +++ "b/\346\263\250\346\204\217.txt" @@ -0,0 +1,2 @@ +http://localhost:49110/swagger/index.html#/ +https://localhost:44392/swagger/index.html#/ \ No newline at end of file