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", 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