Skip to content

Commit

Permalink
😊 发布 v4.9.5.26 版本,修复上一版本引起的 `Serializer options cannot be changed o…
Browse files Browse the repository at this point in the history
…nce serialization or deserialization has occurred.` 错误
  • Loading branch information
MonkSoul committed Nov 22, 2024
1 parent 4cc25e6 commit e73c623
Show file tree
Hide file tree
Showing 42 changed files with 70 additions and 79 deletions.
3 changes: 2 additions & 1 deletion .gitee/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ body:
label: 版本号
description: 请选择项目使用的 Furion 版本?
options:
- 4.9.5.25 (最新)
- 4.9.5.26 (最新)
- 4.9.5.25
- 4.9.5.24
- 4.9.5.23
- 4.9.5.22
Expand Down
2 changes: 1 addition & 1 deletion framework/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<Version>4.9.5.25</Version>
<Version>4.9.5.26</Version>
<ImplicitUsings>enable</ImplicitUsings>
<Authors>百小僧</Authors>
<Company>百签科技(广东)有限公司</Company>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Text.Encodings.Web;

namespace Furion.Authorization;

Expand Down Expand Up @@ -169,14 +168,10 @@ private static async Task UnifyWrapper(DefaultHttpContext httpContext, Exception
Exception = exception
}), out var data);

// 终止返回
// 设置响应状态码
httpContext.Response.StatusCode = StatusCodes.Status500InternalServerError;

// 解决中文乱码问题
var jsonSerializerOptions = App.GetOptions<JsonOptions>()?.JsonSerializerOptions ?? new();
jsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping;

await httpContext.Response.WriteAsJsonAsync(data, jsonSerializerOptions);
await httpContext.Response.WriteAsJsonAsync(data, App.GetOptions<JsonOptions>()?.JsonSerializerOptions);
}
else throw exception;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Text.Encodings.Web;

namespace Furion.Authorization;

Expand Down Expand Up @@ -169,14 +168,10 @@ private static async Task UnifyWrapper(DefaultHttpContext httpContext, Exception
Exception = exception
}), out var data);

// 终止返回
// 设置响应状态码
httpContext.Response.StatusCode = StatusCodes.Status500InternalServerError;

// 解决中文乱码问题
var jsonSerializerOptions = App.GetOptions<JsonOptions>()?.JsonSerializerOptions ?? new();
jsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping;

await httpContext.Response.WriteAsJsonAsync(data, jsonSerializerOptions);
await httpContext.Response.WriteAsJsonAsync(data, App.GetOptions<JsonOptions>()?.JsonSerializerOptions);
}
else throw exception;
}
Expand Down
4 changes: 2 additions & 2 deletions samples/Furion.Core/Furion.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion templates/FurionApiTemplate/Furion.Template.Api.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.Template.Api</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 框架快速搭建 Api 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Furion" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion templates/FurionAppTemplate/Furion.Template.App.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.Template.App</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 框架快速搭建 Mvc/Api 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Furion" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.Template.Blazor.App</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 框架快速搭建 Blazor App 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Furion" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.Template.Blazor</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 框架快速搭建 Blazor 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Furion" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.Template.BlazorWithWebApi</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 框架快速搭建 Blazor和WebApi 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Furion" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion templates/FurionMvcTemplate/Furion.Template.Mvc.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.Template.Mvc</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 框架快速搭建 Mvc 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Furion" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion templates/FurionRazorTemplate/Furion.Template.Razor.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.Template.Razor</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 框架快速搭建 Razor Pages 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Furion" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.Template.RazorWithWebApi</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 框架快速搭建 RazorPages和WebApi 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Furion" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.SqlSugar.Template.Api</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 和 SqlSugar 框架快速搭建 Api 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion.Pure" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
<PackageReference Include="Furion.Pure" Version="4.9.5.26" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.SqlSugar.Template.App</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 和 SqlSugar 框架快速搭建 Mvc/Api 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion.Pure" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
<PackageReference Include="Furion.Pure" Version="4.9.5.26" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.SqlSugar.Template.Blazor.App</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 和 SqlSugar 框架快速搭建 Blazor App 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Furion.Pure" Version="4.9.5.25" />
<PackageReference Include="Furion.Pure" Version="4.9.5.26" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.SqlSugar.Template.Blazor</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 和 SqlSugar 框架快速搭建 Blazor 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion.Pure" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
<PackageReference Include="Furion.Pure" Version="4.9.5.26" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.SqlSugar.Template.BlazorWithWebApi</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 和 SqlSugar 框架快速搭建 Blazor和WebApi 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion.Pure" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.26" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
<PackageReference Include="Furion.Pure" Version="4.9.5.26" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.SqlSugar.Template.Mvc</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 和 SqlSugar 框架快速搭建 Mvc 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion.Pure" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
<PackageReference Include="Furion.Pure" Version="4.9.5.26" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Furion.SqlSugar.Template.Razor</id>
<version>4.9.5.25</version>
<version>4.9.5.26</version>
<description>基于 Furion 和 SqlSugar 框架快速搭建 Razor Pages 多层架构模板。</description>
<authors>百小僧</authors>
<packageTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.25" />
<PackageReference Include="Furion.Pure" Version="4.9.5.25" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.26" />
<PackageReference Include="Furion.Pure" Version="4.9.5.26" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
</ItemGroup>

Expand Down
Loading

0 comments on commit e73c623

Please sign in to comment.