Browse Source

Merge pull request #746 from colinin/cap-7.0.0

upgrade cap to 7.0.0
pull/747/head
yx lin 3 years ago
committed by GitHub
parent
commit
91d2f310e8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      aspnet-core/Directory.Build.props
  2. 7
      aspnet-core/LINGYUN.MicroService.All.sln
  3. 2
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj
  4. 6
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPSubscribeInvoker.cs
  5. 16
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCapSerializer.cs
  6. 2
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs
  7. 1
      aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs
  8. 2
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs
  9. 2
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs
  10. 2
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs
  11. 2
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.Development.json
  12. 2
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
  13. 2
      aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs
  14. 1
      aspnet-core/services/LY.MicroService.identityServer/IdentityServerModule.cs

2
aspnet-core/Directory.Build.props

@ -4,7 +4,7 @@
<LINGYUNAbpPackageVersion>6.0.1</LINGYUNAbpPackageVersion>
<DaprPackageVersion>1.8.0</DaprPackageVersion>
<DistributedLockRedisPackageVersion>1.0.2</DistributedLockRedisPackageVersion>
<DotNetCoreCAPPackageVersion>6.2.0</DotNetCoreCAPPackageVersion>
<DotNetCoreCAPPackageVersion>7.0.0</DotNetCoreCAPPackageVersion>
<ElsaPackageVersion>2.9.0</ElsaPackageVersion>
<AliyunSDKPackageVersion>1.5.10</AliyunSDKPackageVersion>
<AliyunOSSSDKPackageVersion>2.13.0</AliyunOSSSDKPackageVersion>

7
aspnet-core/LINGYUN.MicroService.All.sln

@ -502,6 +502,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.WeCh
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdGenerator.Tests", "tests\LINGYUN.Abp.IdGenerator.Tests\LINGYUN.Abp.IdGenerator.Tests.csproj", "{2BFFE9C3-E022-4B57-9E4D-0A0408424B1A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solution Items", "{7D604751-3FA4-4826-A93B-BBC10D73C861}"
ProjectSection(SolutionItems) = preProject
common.props = common.props
configureawait.props = configureawait.props
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

2
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
<Description>Cap分布式事件总线</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

6
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPSubscribeInvoker.cs

@ -148,7 +148,7 @@ namespace LINGYUN.Abp.EventBus.CAP
if (filter != null)
{
var etContext = new ExecutingContext(context, executeParameters);
filter.OnSubscribeExecuting(etContext);
await filter.OnSubscribeExecutingAsync(etContext);
executeParameters = etContext.Arguments;
}
@ -157,7 +157,7 @@ namespace LINGYUN.Abp.EventBus.CAP
if (filter != null)
{
var edContext = new ExecutedContext(context, resultObj);
filter.OnSubscribeExecuted(edContext);
await filter.OnSubscribeExecutedAsync(edContext);
resultObj = edContext.Result;
}
}
@ -166,7 +166,7 @@ namespace LINGYUN.Abp.EventBus.CAP
if (filter != null)
{
var exContext = new ExceptionContext(context, e);
filter.OnSubscribeException(exContext);
await filter.OnSubscribeExceptionAsync(exContext);
if (!exContext.ExceptionHandled)
{
throw exContext.Exception;

16
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCapSerializer.cs

@ -24,7 +24,7 @@ namespace LINGYUN.Abp.EventBus.CAP
_jsonSerializerOptions = options.Value;
}
public Task<TransportMessage> SerializeAsync(Message message)
public ValueTask<TransportMessage> SerializeAsync(Message message)
{
if (message == null)
{
@ -33,26 +33,26 @@ namespace LINGYUN.Abp.EventBus.CAP
if (message.Value == null)
{
return Task.FromResult(new TransportMessage(message.Headers, null));
return ValueTask.FromResult(new TransportMessage(message.Headers, null));
}
var messageStr = _jsonSerializer.Serialize(message.Value);
var jsonBytes = Encoding.UTF8.GetBytes(messageStr);
// var jsonBytes = JsonSerializer.SerializeToUtf8Bytes(message.Value, _jsonSerializerOptions.JsonSerializerOptions);
return Task.FromResult(new TransportMessage(message.Headers, jsonBytes));
return ValueTask.FromResult(new TransportMessage(message.Headers, jsonBytes));
}
public Task<Message> DeserializeAsync(TransportMessage transportMessage, Type valueType)
public ValueTask<Message> DeserializeAsync(TransportMessage transportMessage, Type valueType)
{
if (valueType == null || transportMessage.Body == null || transportMessage.Body.Length == 0)
if (valueType == null || ReadOnlyMemory<byte>.Empty.Equals(transportMessage.Body) || transportMessage.Body.Length == 0)
{
return Task.FromResult(new Message(transportMessage.Headers, null));
return ValueTask.FromResult(new Message(transportMessage.Headers, null));
}
var messageBytes = Encoding.UTF8.GetString(transportMessage.Body);
var messageBytes = Encoding.UTF8.GetString(transportMessage.Body.Span);
var obj = _jsonSerializer.Deserialize(valueType, messageBytes);
// var obj = JsonSerializer.Deserialize(transportMessage.Body, valueType, _jsonSerializerOptions.JsonSerializerOptions);
return Task.FromResult(new Message(transportMessage.Headers, obj));
return ValueTask.FromResult(new Message(transportMessage.Headers, obj));
}
public string Serialize(Message message)

2
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs

@ -117,8 +117,6 @@ public partial class AuthServerHttpApiHostModule : AbpModule
app.UseMapRequestLocalization();
// 授权
app.UseAuthorization();
// Cap Dashboard
app.UseCapDashboard();
// Swagger
app.UseSwagger();
// Swagger可视化界面

1
aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs

@ -132,7 +132,6 @@ public partial class AuthServerModule : AbpModule
app.UseAbpOpenIddictValidation();
app.UseMultiTenancy();
app.UseAuthorization();
app.UseCapDashboard();
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();

2
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs

@ -150,8 +150,6 @@ public partial class BackendAdminHttpApiHostModule : AbpModule
app.UseMultiTenancy();
// 授权
app.UseAuthorization();
// Cap Dashboard
app.UseCapDashboard();
// Swagger
app.UseSwagger();
// Swagger可视化界面

2
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs

@ -105,8 +105,6 @@ namespace LY.MicroService.LocalizationManagement
app.UseMapRequestLocalization();
// 授权
app.UseAuthorization();
// Cap Dashboard
app.UseCapDashboard();
// Swagger
app.UseSwagger();
// Swagger可视化界面

2
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs

@ -139,8 +139,6 @@ public partial class PlatformManagementHttpApiHostModule : AbpModule
app.UseMapRequestLocalization();
// 授权
app.UseAuthorization();
// Cap Dashboard
app.UseCapDashboard();
// Swagger
app.UseSwagger();
// Swagger可视化界面

2
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.Development.json

@ -1,6 +1,6 @@
{
"AgileConfig": {
"IsEnabled": true,
"IsEnabled": false,
"env": "DEV",
"appId": "LINGYUN.Abp.Platform",
"secret": "1q2w3E*",

2
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs

@ -152,8 +152,6 @@ public partial class RealtimeMessageHttpApiHostModule : AbpModule
app.UseMapRequestLocalization();
// 授权
app.UseAuthorization();
// Cap Dashboard
app.UseCapDashboard();
// Swagger
app.UseSwagger();
// Swagger可视化界面

2
aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs

@ -116,8 +116,6 @@ public partial class IdentityServerHttpApiHostModule : AbpModule
app.UseMapRequestLocalization();
// 授权
app.UseAuthorization();
// Cap Dashboard
app.UseCapDashboard();
// Swagger
app.UseSwagger();
// Swagger可视化界面

1
aspnet-core/services/LY.MicroService.identityServer/IdentityServerModule.cs

@ -136,7 +136,6 @@ public partial class IdentityServerModule : AbpModule
app.UseMapRequestLocalization();
app.UseIdentityServer();
app.UseAuthorization();
app.UseCapDashboard();
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();

Loading…
Cancel
Save