Browse Source

Merge pull request #862 from leehom0123/master

本地化支持修改
pull/865/head
yx lin 2 years ago
committed by GitHub
parent
commit
7c72807496
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      apps/vue/run.bat
  2. 5
      apps/vue/src/api/localization/languages.ts
  3. 4
      apps/vue/src/api/localization/model/languagesModel.ts
  4. 4
      apps/vue/src/api/localization/model/resourcesModel.ts
  5. 5
      apps/vue/src/api/localization/resources.ts
  6. 3
      apps/vue/src/utils/http/axios/index.ts
  7. 4
      apps/vue/src/views/localization/languages/components/LanguageTable.vue
  8. 8
      apps/vue/src/views/localization/resources/components/ResourceTable.vue
  9. 2
      apps/vue/src/views/messages/notifications/datas/ModalData.ts
  10. 2
      apps/vue/src/views/messages/notifications/datas/TableData.ts
  11. 2
      apps/vue/src/views/saas/tenant/components/TenantTable.vue
  12. 25
      aspnet-core/migrate-database.bat
  13. 17
      aspnet-core/migrate-db-cmd.bat
  14. 11
      aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessagesHub.cs
  15. 9
      aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Messages/SignalRMessageSenderProvider.cs
  16. 7
      aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/GetLanguageWithFilterDto.cs
  17. 7
      aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/GetResourceWithFilterDto.cs
  18. 2
      aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ILanguageAppService.cs
  19. 2
      aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/IResourceAppService.cs
  20. 17
      aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageAppService.cs
  21. 4
      aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageController.cs
  22. 14
      aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ResourceAppService.cs
  23. 4
      aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ResourceController.cs
  24. 4
      aspnet-core/modules/notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN.Abp.Notifications.Domain.csproj
  25. 9
      aspnet-core/modules/open-api/LINGYUN.Abp.OpenApi.Authorization/LINGYUN/Abp/OpenApi/Authorization/OpenApiAuthorizationService.cs
  26. 4
      aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN.Abp.Rules.RulesEngine.csproj
  27. 4
      aspnet-core/modules/text-templating/LINGYUN.Abp.TextTemplating.Application/LINGYUN.Abp.TextTemplating.Application.csproj
  28. 2
      aspnet-core/modules/tui-juhe/LINGYUN.Abp.TuiJuhe/LINGYUN.Abp.TuiJuhe.csproj
  29. 4
      aspnet-core/modules/tui-juhe/LINGYUN.Abp.TuiJuhe/LINGYUN/Abp/TuiJuhe/AbpTuiJuheModule.cs
  30. 12
      aspnet-core/modules/tui-juhe/LINGYUN.Abp.TuiJuhe/LINGYUN/Abp/TuiJuhe/TuiJuheResult.cs
  31. 1
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Program.cs
  32. 3
      aspnet-core/services/LY.MicroService.AuthServer/Program.cs
  33. 1
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Program.cs
  34. 1
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Program.cs
  35. 10
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs
  36. 1
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Program.cs
  37. 2
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Program.cs
  38. 1
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Program.cs
  39. 2
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs
  40. 1
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Program.cs
  41. 14
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs
  42. 1
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Program.cs
  43. 1
      aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/Program.cs
  44. 1
      aspnet-core/services/LY.MicroService.identityServer/Program.cs
  45. 2
      aspnet-core/start-all-service.bat
  46. 5
      aspnet-core/start-http-api-host.bat
  47. 7
      aspnet-core/start-internal-gateway.bat
  48. 1
      aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Program.cs
  49. 2
      build/build-aspnetcore-common.ps1
  50. 17
      build/modules.dependencies.json
  51. 83
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Ocelot/Configuration/AutoConfigOcelot.cs
  52. 129
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.aggregate.json
  53. 1268
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.backendadmin.json
  54. 48
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.global.json
  55. 435
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.idsadmin.json
  56. 247
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.localization.json
  57. 714
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.messages.json
  58. 617
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.platform.json
  59. 183
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.task.json
  60. 121
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.webhook.json
  61. 13
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Program.cs
  62. 1895
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json
  63. 4349
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.json
  64. 26
      starter/00.auto-config-docker.cmd
  65. 4
      starter/01.migrate-db.cmd
  66. 4
      starter/10.start-ids.bat
  67. 4
      starter/11.start-ids-admin.bat
  68. 4
      starter/12.start-localization.bat
  69. 4
      starter/13.start-platform.bat
  70. 4
      starter/14.start-messages.bat
  71. 4
      starter/15.start-task-management.bat
  72. 4
      starter/16.start-webhooks-management.bat
  73. 4
      starter/17.start-workflow-management.bat
  74. 4
      starter/18.start-admin.bat
  75. 4
      starter/70.start-internal-gateway.bat
  76. 9
      starter/80.start-host.cmd
  77. 6
      starter/91.install-node-module.cmd
  78. 5
      starter/99.start-ui.cmd
  79. 8
      starter/readme.md

1
apps/vue/run.bat

@ -1 +1,2 @@
title abp-next-admin-vben
npm run dev

5
apps/vue/src/api/localization/languages.ts

@ -1,5 +1,5 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { LanguageListResult, LanguageCreate, LanguageUpdate, Language } from './model/languagesModel';
import { LanguageListResult, LanguageCreate, LanguageUpdate, Language, GetLanguageWithFilter } from './model/languagesModel';
const remoteServiceName = 'LocalizationManagement';
const controllerName = 'Language';
@ -8,9 +8,10 @@ enum Api {
GetList = '/api/abp/localization/languages',
}
export const getList = () => {
export const getList = (input: GetLanguageWithFilter) => {
return defAbpHttp.get<LanguageListResult>({
url: Api.GetList,
params: input,
});
};

4
apps/vue/src/api/localization/model/languagesModel.ts

@ -26,3 +26,7 @@ export interface LanguagePagedResult extends PagedResultDto<Language> {}
export interface GetLanguagePagedRequest extends PagedAndSortedResultRequestDto {
filter?: string;
}
export interface GetLanguageWithFilter {
filter?: string;
}

4
apps/vue/src/api/localization/model/resourcesModel.ts

@ -26,3 +26,7 @@ export interface ResourcePagedResult extends PagedResultDto<Resource> {}
export interface GetResourcePagedRequest extends PagedAndSortedResultRequestDto {
filter?: string;
}
export interface GetResourceWithFilter {
filter?: string;
}

5
apps/vue/src/api/localization/resources.ts

@ -1,5 +1,5 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { ResourceListResult, Resource, ResourceCreate, ResourceUpdate } from './model/resourcesModel';
import { ResourceListResult, Resource, ResourceCreate, ResourceUpdate, GetResourceWithFilter } from './model/resourcesModel';
const remoteServiceName = 'LocalizationManagement';
const controllerName = 'Resource';
@ -8,9 +8,10 @@ enum Api {
GetList = '/api/abp/localization/resources',
}
export const getList = () => {
export const getList = (input: GetResourceWithFilter) => {
return defAbpHttp.get<ResourceListResult>({
url: Api.GetList,
params: input,
});
};

3
apps/vue/src/utils/http/axios/index.ts

@ -136,6 +136,9 @@ const transform: AxiosTransform = {
if ((config as Recordable)?.requestOptions?.withAcceptLanguage !== false) {
const localeStore = useLocaleStoreWithOut();
config.headers['Accept-Language'] = localeStore.getLocale;
if (config.headers['Accept-Language'] == 'zh_CN') {
config.headers['Accept-Language'] = 'zh-Hans';
}
}
return config;
},

4
apps/vue/src/views/localization/languages/components/LanguageTable.vue

@ -89,8 +89,8 @@
function fetchLanguages() {
const form = getForm();
return form.validate().then(() => {
return getList().then((res) => {
return form.validate().then((input) => {
return getList(input).then((res) => {
setTableData(res.items);
});
});

8
apps/vue/src/views/localization/resources/components/ResourceTable.vue

@ -47,7 +47,9 @@
import { getList, GetAsyncByName, DeleteAsyncByName } from '/@/api/localization/resources';
import { Resource } from '/@/api/localization/model/resourcesModel';
import { getDataColumns } from './TableData';
import { reactive } from 'vue';
import ResourceModal from './ResourceModal.vue';
const { createConfirm, createMessage } = useMessage();
const { L } = useLocalization(['LocalizationManagement', 'AbpLocalization', 'AbpUi']);
@ -72,7 +74,7 @@
component: 'Input',
label: L('Search'),
colProps: { span: 24 },
defaultValue: '',
defaultValue: ''
},
],
submitFunc: fetchResources,
@ -87,8 +89,8 @@
function fetchResources() {
const form = getForm();
return form.validate().then(() => {
return getList().then((res) => {
return form.validate().then((input) => {
return getList(input).then((res) => {
setTableData(res.items);
});
});

2
apps/vue/src/views/messages/notifications/datas/ModalData.ts

@ -2,7 +2,7 @@ import { useLocalization } from '/@/hooks/abp/useLocalization';
import { FormProps } from '/@/components/Form';
import { NotificationReadState } from '/@/api/messages/model/notificationsModel';
const { L } = useLocalization(['AbpMessageService', 'AbpUi']);
const { L } = useLocalization(['AbpMessageService', 'Notifications', 'AbpUi']);
export function getSearchFormSchemas(): Partial<FormProps> {
return {

2
apps/vue/src/views/messages/notifications/datas/TableData.ts

@ -2,7 +2,7 @@ import { useLocalization } from '/@/hooks/abp/useLocalization';
import { BasicColumn } from '/@/components/Table';
import { formatToDateTime } from '/@/utils/dateUtil';
const { L } = useLocalization('AbpMessageService');
const { L } = useLocalization('Notifications');
export function getDataColumns(): BasicColumn[] {
return [

2
apps/vue/src/views/saas/tenant/components/TenantTable.vue

@ -73,7 +73,7 @@
import TenantModal from './TenantModal.vue';
import ConnectionTableModal from './ConnectionTableModal.vue';
const { L } = useLocalization(['AbpSaas', 'AbpFeatureManagement']);
const { L } = useLocalization(['AbpSaas', 'AbpFeatureManagement','WeChat']);
const { hasPermission } = usePermission();
const tableElRef = ref<Nullable<TableActionType>>(null);
const [registerConnectModal, { openModal: openConnectModal }] = useModal();

25
aspnet-core/migrate-database.bat

@ -1,19 +1,12 @@
@echo off
cls
set stime=8
start .\migrate-db-cmd.bat LY.MicroService.BackendAdmin.DbMigrator admin --run
ping -n %stime% 127.1 >nul
start .\migrate-db-cmd.bat LY.MicroService.AuthServer.DbMigrator auth-server --run
ping -n %stime% 127.1 >nul
start .\migrate-db-cmd.bat LY.MicroService.IdentityServer.DbMigrator identityserver4-admin --run
ping -n %stime% 127.1 >nul
start .\migrate-db-cmd.bat LY.MicroService.LocalizationManagement.DbMigrator localization --run
ping -n %stime% 127.1 >nul
start .\migrate-db-cmd.bat LY.MicroService.Platform.DbMigrator platform --run
ping -n %stime% 127.1 >nul
start .\migrate-db-cmd.bat LY.MicroService.RealtimeMessage.DbMigrator messages --run
ping -n %stime% 127.1 >nul
start .\migrate-db-cmd.bat LY.MicroService.TaskManagement.DbMigrator task-management --run
ping -n %stime% 127.1 >nul
start .\migrate-db-cmd.bat LY.MicroService.WebhooksManagement.DbMigrator webhooks-management --run
call .\migrate-db-cmd.bat LY.MicroService.BackendAdmin.DbMigrator admin --run
call .\migrate-db-cmd.bat LY.MicroService.AuthServer.DbMigrator auth-server --run
call .\migrate-db-cmd.bat LY.MicroService.IdentityServer.DbMigrator identityserver4-admin --run
call .\migrate-db-cmd.bat LY.MicroService.LocalizationManagement.DbMigrator localization --run
call .\migrate-db-cmd.bat LY.MicroService.Platform.DbMigrator platform --run
call .\migrate-db-cmd.bat LY.MicroService.RealtimeMessage.DbMigrator messages --run
call .\migrate-db-cmd.bat LY.MicroService.TaskManagement.DbMigrator task-management --run
call .\migrate-db-cmd.bat LY.MicroService.WebhooksManagement.DbMigrator webhooks-management --run
pause

17
aspnet-core/migrate-db-cmd.bat

@ -1,10 +1,9 @@
@echo off
cls
chcp 65001
title %2
@echo %2 migration running
@echo %2 migrating
cd .\migrations\%1
@ -15,14 +14,18 @@ if '%3' equ '' goto run
exit
:run
dotnet run
pause
exit
dotnet run
goto end
:restore
dotnet restore
exit
goto end
:efu
dotnet ef databse update
exit
goto end
:end
cd ..\..\
@echo %2 migrated
@echo --------

11
aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessagesHub.cs

@ -41,6 +41,9 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs
protected IUserGroupStore UserGroupStore => LazyServiceProvider.LazyGetRequiredService<IUserGroupStore>();
protected AbpExceptionHandlingOptions ExceptionHandlingOptions => LazyServiceProvider.LazyGetRequiredService<IOptions<AbpExceptionHandlingOptions>>().Value;
public override async Task OnConnectedAsync()
{
await base.OnConnectedAsync();
@ -167,8 +170,8 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs
{
var errorInfo = ErrorInfoConverter.Convert(ex, options =>
{
options.SendExceptionsDetailsToClients = false;
options.SendStackTraceToClients = false;
options.SendExceptionsDetailsToClients = ExceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = ExceptionHandlingOptions.SendStackTraceToClients;
});
await SendMessageAsync(
@ -230,8 +233,8 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs
{
var errorInfo = ErrorInfoConverter.Convert(ex, options =>
{
options.SendExceptionsDetailsToClients = false;
options.SendStackTraceToClients = false;
options.SendExceptionsDetailsToClients = ExceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = ExceptionHandlingOptions.SendStackTraceToClients;
});
if (!chatMessage.GroupId.IsNullOrWhiteSpace())
{

9
aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Messages/SignalRMessageSenderProvider.cs

@ -19,14 +19,17 @@ namespace LINGYUN.Abp.IM.SignalR.Messages
private readonly AbpIMSignalROptions _options;
private readonly IHubContext<MessagesHub> _hubContext;
private readonly AbpExceptionHandlingOptions _exceptionHandlingOptions;
public SignalRMessageSenderProvider(
IHubContext<MessagesHub> hubContext,
IAbpLazyServiceProvider serviceProvider,
IOptions<AbpIMSignalROptions> options)
IOptions<AbpIMSignalROptions> options,
IOptions<AbpExceptionHandlingOptions> exceptionHandlingOptions)
: base(serviceProvider)
{
_options = options.Value;
_exceptionHandlingOptions = exceptionHandlingOptions.Value;
_hubContext = hubContext;
}
@ -99,8 +102,8 @@ namespace LINGYUN.Abp.IM.SignalR.Messages
{
var errorInfo = errorInfoConverter.Convert(ex, options =>
{
options.SendExceptionsDetailsToClients = false;
options.SendStackTraceToClients = false;
options.SendExceptionsDetailsToClients = _exceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = _exceptionHandlingOptions.SendStackTraceToClients;
});
if (!chatMessage.GroupId.IsNullOrWhiteSpace())
{

7
aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/GetLanguageWithFilterDto.cs

@ -0,0 +1,7 @@
namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
{
public class GetLanguageWithFilterDto
{
public string Filter { get; set; }
}
}

7
aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/GetResourceWithFilterDto.cs

@ -0,0 +1,7 @@
namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
{
public class GetResourceWithFilterDto
{
public string Filter { get; set; }
}
}

2
aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ILanguageAppService.cs

@ -6,6 +6,6 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
{
public interface ILanguageAppService : IApplicationService
{
Task<ListResultDto<LanguageDto>> GetListAsync();
Task<ListResultDto<LanguageDto>> GetListAsync(GetLanguageWithFilterDto input);
}
}

2
aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/IResourceAppService.cs

@ -6,6 +6,6 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
{
public interface IResourceAppService : IApplicationService
{
Task<ListResultDto<ResourceDto>> GetListAsync();
Task<ListResultDto<ResourceDto>> GetListAsync(GetResourceWithFilterDto input);
}
}

17
aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageAppService.cs

@ -1,9 +1,17 @@
using Microsoft.AspNetCore.Authorization;
using System.Linq;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Volo.Abp;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Localization;
using Volo.Abp.Localization.External;
namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
{
@ -16,9 +24,12 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
_languageProvider = languageProvider;
}
public async virtual Task<ListResultDto<LanguageDto>> GetListAsync()
public async virtual Task<ListResultDto<LanguageDto>> GetListAsync(GetLanguageWithFilterDto input)
{
var languages = await _languageProvider.GetLanguagesAsync();
var languages = (await _languageProvider.GetLanguagesAsync())
.WhereIf(!input.Filter.IsNullOrWhiteSpace(), x => x.CultureName.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0
|| x.UiCultureName.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0
|| x.DisplayName.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0);
return new ListResultDto<LanguageDto>(
languages.Select(l => new LanguageDto

4
aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageController.cs

@ -19,9 +19,9 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
}
[HttpGet]
public virtual Task<ListResultDto<LanguageDto>> GetListAsync()
public virtual Task<ListResultDto<LanguageDto>> GetListAsync(GetLanguageWithFilterDto input)
{
return _service.GetListAsync();
return _service.GetListAsync(input);
}
}
}

14
aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ResourceAppService.cs

@ -1,6 +1,12 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Options;
using System.Linq;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Volo.Abp;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
@ -23,12 +29,14 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
_externalLocalizationStore = externalLocalizationStore;
}
public virtual async Task<ListResultDto<ResourceDto>> GetListAsync()
public virtual async Task<ListResultDto<ResourceDto>> GetListAsync(GetResourceWithFilterDto input)
{
var externalResources = await _externalLocalizationStore.GetResourcesAsync();
var externalResources = (await _externalLocalizationStore.GetResourcesAsync())
.WhereIf(!input.Filter.IsNullOrWhiteSpace(), x => x.ResourceName.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0);
var resources = _localizationOptions
.Resources
.WhereIf(!input.Filter.IsNullOrWhiteSpace(), x => x.Value.ResourceName.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0)
.Select(x => new ResourceDto
{
Name = x.Value.ResourceName,

4
aspnet-core/modules/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ResourceController.cs

@ -19,9 +19,9 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
}
[HttpGet]
public virtual Task<ListResultDto<ResourceDto>> GetListAsync()
public virtual Task<ListResultDto<ResourceDto>> GetListAsync(GetResourceWithFilterDto input)
{
return _service.GetListAsync();
return _service.GetListAsync(input);
}
}
}

4
aspnet-core/modules/notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN.Abp.Notifications.Domain.csproj

@ -8,10 +8,6 @@
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\Notifications\DynamicNotificationDefinitionStore.cs~RF299208b7.TMP" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Caching" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(VoloAbpPackageVersion)" />

9
aspnet-core/modules/open-api/LINGYUN.Abp.OpenApi.Authorization/LINGYUN/Abp/OpenApi/Authorization/OpenApiAuthorizationService.cs

@ -26,17 +26,20 @@ namespace LINGYUN.Abp.OpenApi.Authorization
private readonly AbpOpenApiOptions _openApiOptions;
private readonly ICurrentClient _currentClient;
private readonly IWebClientInfoProvider _clientInfoProvider;
private readonly AbpExceptionHandlingOptions _exceptionHandlingOptions;
public OpenApiAuthorizationService(
IAppKeyStore appKeyStore,
ICurrentClient currentClient,
IWebClientInfoProvider clientInfoProvider,
IOptionsMonitor<AbpOpenApiOptions> options)
IOptionsMonitor<AbpOpenApiOptions> options,
IOptions<AbpExceptionHandlingOptions> exceptionHandlingOptions)
{
_appKeyStore = appKeyStore;
_currentClient = currentClient;
_clientInfoProvider = clientInfoProvider;
_openApiOptions = options.CurrentValue;
_exceptionHandlingOptions = exceptionHandlingOptions.Value;
}
public async virtual Task<bool> AuthorizeAsync(HttpContext httpContext)
@ -177,8 +180,8 @@ namespace LINGYUN.Abp.OpenApi.Authorization
var errorInfoConverter = context.RequestServices.GetRequiredService<IExceptionToErrorInfoConverter>();
var errorInfo = errorInfoConverter.Convert(exception, options =>
{
options.SendExceptionsDetailsToClients = false;
options.SendStackTraceToClients = false;
options.SendExceptionsDetailsToClients = _exceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = _exceptionHandlingOptions.SendStackTraceToClients;
});
if (context.Request.CanAccept(MimeTypes.Application.Json) ||

4
aspnet-core/modules/rules/LINGYUN.Abp.Rules.RulesEngine/LINGYUN.Abp.Rules.RulesEngine.csproj

@ -8,10 +8,6 @@
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\Rules\RulesEngine\IWorkflowsResolver.cs~RF3e2c1c6.TMP" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="RulesEngine" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Json" Version="$(VoloAbpPackageVersion)" />

4
aspnet-core/modules/text-templating/LINGYUN.Abp.TextTemplating.Application/LINGYUN.Abp.TextTemplating.Application.csproj

@ -8,10 +8,6 @@
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\TextTemplating\TextTemplateDefinitionAppService.cs~RF1f4f741d.TMP" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="$(VoloAbpPackageVersion)" />

2
aspnet-core/modules/tui-juhe/LINGYUN.Abp.TuiJuhe/LINGYUN.Abp.TuiJuhe.csproj

@ -18,7 +18,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Caching" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Json.Newtonsoft" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Json.SystemTextJson" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Http" Version="$(MicrosoftPackageVersion)" />
</ItemGroup>

4
aspnet-core/modules/tui-juhe/LINGYUN.Abp.TuiJuhe/LINGYUN/Abp/TuiJuhe/AbpTuiJuheModule.cs

@ -2,7 +2,7 @@
using LINGYUN.Abp.TuiJuhe.Localization;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Caching;
using Volo.Abp.Json.Newtonsoft;
using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.Settings;
@ -11,7 +11,7 @@ using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.TuiJuhe;
[DependsOn(
typeof(AbpJsonNewtonsoftModule),
typeof(AbpJsonSystemTextJsonModule),
typeof(AbpSettingsModule),
typeof(AbpCachingModule),
typeof(AbpFeaturesLimitValidationModule))]

12
aspnet-core/modules/tui-juhe/LINGYUN.Abp.TuiJuhe/LINGYUN/Abp/TuiJuhe/TuiJuheResult.cs

@ -1,5 +1,5 @@
using Newtonsoft.Json;
using System;
using System;
using System.Text.Json.Serialization;
namespace LINGYUN.Abp.TuiJuhe;
@ -9,22 +9,22 @@ public class TuiJuheResult<TParam, TResult>
/// <summary>
/// 状态码
/// </summary>
[JsonProperty("code")]
[JsonPropertyName("code")]
public int Code { get; set; }
/// <summary>
/// 错误消息
/// </summary>
[JsonProperty("reason")]
[JsonPropertyName("reason")]
public string Reason { get; set; }
/// <summary>
/// 响应数据
/// </summary>
[JsonProperty("result")]
[JsonPropertyName("result")]
public TResult Result { get; set; }
/// <summary>
/// 响应参数
/// </summary>
[JsonProperty("params")]
[JsonPropertyName("params")]
public TParam Params { get; set; }
[JsonIgnore]

1
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Program.cs

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "IdentityServer.HttpApi.Host";
Log.Information("Starting IdentityServer.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);

3
aspnet-core/services/LY.MicroService.AuthServer/Program.cs

@ -18,8 +18,9 @@ public class Program
{
try
{
Console.Title = "IdentityServer";
Log.Information("Starting IdentityServer.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()

1
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Program.cs

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "BackendAdmin.Host";
Log.Information("Starting BackendAdmin.Host.");
var builder = WebApplication.CreateBuilder(args);

1
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Program.cs

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "LocalizationManagement.HttpApi.Host";
Log.Information("Starting LocalizationManagement.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);

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

@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using StackExchange.Redis;
using System;
@ -164,10 +165,11 @@ public partial class PlatformManagementHttpApiHostModule
});
Configure<Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingOptions>(options =>
{
// 是否发送错误详情
options.SendExceptionsDetailsToClients = false;
});
{
// 是否发送错误详情
options.SendExceptionsDetailsToClients = true;
options.SendStackTraceToClients = true;
});
}
private void ConfigureAuditing(IConfiguration configuration)

1
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Program.cs

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "PlatformManagement.HttpApi.Host";
Log.Information("Starting PlatformManagement.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);

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

@ -18,8 +18,8 @@ public class Program
{
try
{
Console.Title = "RealtimeMessage.HttpApi.Host";
Log.Information("Starting RealtimeMessage.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()

1
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Program.cs

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "TaskManagement.HttpApi.Host";
Log.Information("Starting TaskManagement.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);

2
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs

@ -251,7 +251,7 @@ public partial class TaskManagementHttpApiHostModule
services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "WorkflowManagement API", Version = "v1" });
options.SwaggerDoc("v1", new OpenApiInfo { Title = "TaskManagement API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme

1
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Program.cs

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "Web.Host";
Log.Information("Starting web host.");
var builder = WebApplication.CreateBuilder(args);

14
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs

@ -2,6 +2,7 @@
using LINGYUN.Abp.BackgroundTasks;
using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Localization.CultureMap;
using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using LINGYUN.Abp.Webhooks;
@ -358,6 +359,19 @@ public partial class WebhooksManagementHttpApiHostModule
options.UsePersistence<WebhooksManagementResource>();
});
Configure<AbpLocalizationCultureMapOptions>(options =>
{
var zhHansCultureMapInfo = new CultureMapInfo
{
TargetCulture = "zh-Hans",
SourceCultures = new string[] { "zh", "zh_CN", "zh-CN" }
};
options.CulturesMaps.Add(zhHansCultureMapInfo);
options.UiCulturesMaps.Add(zhHansCultureMapInfo);
});
}
private void ConfigureSecurity(IServiceCollection services, IConfiguration configuration, bool isDevelopment = false)

1
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Program.cs

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "WorkflowManagement.HttpApi.Host";
Log.Information("Starting WorkflowManagement.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);

1
aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/Program.cs

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "IdentityServer.HttpApi.Host";
Log.Information("Starting IdentityServer.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);

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

@ -18,6 +18,7 @@ public class Program
{
try
{
Console.Title = "IdentityServer";
Log.Information("Starting IdentityServer.");
var builder = WebApplication.CreateBuilder(args);

2
aspnet-core/start-all-service.bat

@ -16,8 +16,6 @@ start .\start-http-api-host.bat LY.MicroService.TaskManagement.HttpApi.Host task
ping -n %stime% 127.1 >nul
start .\start-http-api-host.bat LY.MicroService.WebhooksManagement.HttpApi.Host webhooks-management--run
ping -n %stime% 127.1 >nul
start .\start-http-api-host.bat LY.MicroService.RealtimeMessage.HttpApi.Host realtime-message --run
ping -n %stime% 127.1 >nul
start .\start-http-api-host.bat LY.MicroService.WorkflowManagement.HttpApi.Host workflow-management --run
ping -n %stime% 127.1 >nul
start .\start-http-api-host.bat LY.MicroService.BackendAdmin.HttpApi.Host admin --run

5
aspnet-core/start-http-api-host.bat

@ -8,6 +8,7 @@ title %2-host
cd .\services\%1
if '%3' equ '--publish' goto publish
if '%3' equ '--watchrun' goto watchrun
if '%3' equ '--run' goto run
if '%3' equ '--restore' goto restore
if '%3' equ '--ef-u' goto efu
@ -23,6 +24,10 @@ exit
dotnet run
exit
:watchrun
dotnet watch run --no-restore
exit
:restore
dotnet restore
exit

7
aspnet-core/start-internal-gateway.bat

@ -2,12 +2,15 @@
cls
chcp 65001
title internal-apigateway
echo. 启动内部网关
cd ..\gateways\internal\LINGYUN.MicroService.Internal.ApiGateway\src\LINGYUN.MicroService.Internal.ApiGateway\
if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run
if '%1' equ '--watchrun' goto watchrun
if '%1' equ '--restore' goto restore
if '%1' equ '' goto run
exit
@ -21,6 +24,10 @@ exit
dotnet run
exit
:watchrun
dotnet watch run --no-restore
exit
:restore
dotnet restore
exit

1
aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Program.cs

@ -19,6 +19,7 @@ public class Program
{
try
{
Console.Title = "Web.Host";
Log.Information("Starting web host.");
var builder = WebApplication.CreateBuilder(args);

2
build/build-aspnetcore-common.ps1

@ -14,6 +14,8 @@ $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/"; Service = "platform" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/"; Service = "messages" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/"; Service = "task-management" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/"; Service = "webhooks" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/"; Service = "workflow" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/"; Service = "internal-apigateway" }
[PsObject[]]$solutionArray = @()

17
build/modules.dependencies.json

@ -1,6 +1,6 @@
[
{
"tag": "net6.0",
"tag": "net7.0",
"dependencies": [
{
"service": "Backend-Admin",
@ -26,7 +26,10 @@
"LINGYUN.Platform.Domain.Shared.dll",
"LINGYUN.Abp.Tencent.dll",
"LINGYUN.Abp.Tencent.QQ.dll",
"LINGYUN.Abp.Tencent.SettingManagement.dll"
"LINGYUN.Abp.Tencent.SettingManagement.dll",
"LINGYUN.Abp.WxPusher.SettingManagement.dll",
"LINGYUN.Abp.PushPlus.SettingManagement.dll",
"LINGYUN.Abp.TuiJuhe.SettingManagement.dll"
]
},
{
@ -43,8 +46,7 @@
"Volo.Abp.Users.Domain.Shared.dll",
"Volo.Abp.Users.Abstractions.dll",
"LINGYUN.Abp.IdentityServer.Application.Contracts.dll",
"Volo.Abp.IdentityServer.Domain.Shared.dll",
"Volo.Abp.Json.Newtonsoft.dll"
"Volo.Abp.IdentityServer.Domain.Shared.dll"
]
}
]
@ -60,8 +62,6 @@
"LINGYUN.Abp.Account.Templates.dll",
"LINGYUN.Abp.Features.LimitValidation.dll",
"LINGYUN.Abp.Features.LimitValidation.Redis.dll",
"LINGYUN.Abp.WorkflowManagement.Application.Contracts.dll",
"LINGYUN.Abp.WorkflowManagement.Domain.Shared.dll",
"LINGYUN.Abp.BackgroundTasks.Abstractions.dll",
"LINGYUN.Linq.Dynamic.Queryable.dll",
"LINGYUN.Abp.Dynamic.Queryable.Application.Contracts.dll",
@ -69,7 +69,10 @@
"LINGYUN.Abp.TaskManagement.Domain.Shared.dll",
"LINGYUN.Abp.Notifications.Core.dll",
"LINGYUN.Abp.Notifications.Common.dll",
"LINGYUN.Abp.Notifications.dll"
"LINGYUN.Abp.Notifications.dll",
"LINGYUN.Abp.PushPlus.dll",
"LINGYUN.Abp.WxPusher.dll",
"LINGYUN.Abp.TuiJuhe.dll"
]
}
]

83
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Ocelot/Configuration/AutoConfigOcelot.cs

@ -0,0 +1,83 @@

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using Castle.Core.Logging;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.Memory;
using Newtonsoft.Json;
using Ocelot.Configuration.File;
using Serilog;
using Serilog.Core;
namespace Ocelot.DependencyInjection
{
public static class ConfigurationBuilderExtensions
{
public static IConfigurationBuilder AddAutoOcelotConfig(this IConfigurationBuilder builder, IWebHostEnvironment env)
{
return builder.AddAutoOcelotConfig(".", env);
}
static object locker = new object();
public static IConfigurationBuilder AddAutoOcelotConfig(this IConfigurationBuilder builder, string folder, IWebHostEnvironment env)
{
WriteFile(folder, env);
Action<object, FileSystemEventArgs> fileChanged = (sender, e) =>
{
lock (locker)
{
Log.Debug("Ocelot config regenerate...");
Thread.Sleep(100); //解决vs文件保存时多次触发change事件时引起异常
WriteFile(folder, env);
}
};
FileSystemWatcher watcher = new FileSystemWatcher("OcelotConfig", "*.json");
watcher.Changed += new FileSystemEventHandler(fileChanged);
watcher.Deleted += new FileSystemEventHandler(fileChanged);
watcher.Created += new FileSystemEventHandler(fileChanged);
watcher.Renamed += new RenamedEventHandler(fileChanged);
watcher.EnableRaisingEvents = true;
builder.AddJsonFile("ocelot.json", optional: true, reloadOnChange: true);
return builder;
}
private static void WriteFile(string folder, IWebHostEnvironment env)
{
string excludeConfigName = ((env != null && env.EnvironmentName != null) ? ("ocelot." + env.EnvironmentName + ".json") : string.Empty);
Regex reg = new Regex("^ocelot\\.(.*?)\\.json$", RegexOptions.IgnoreCase | RegexOptions.Singleline);
List<FileInfo> list = (from fi in new DirectoryInfo(folder).EnumerateFiles()
where reg.IsMatch(fi.Name) && fi.Name != excludeConfigName
select fi).ToList();
FileConfiguration fileConfiguration = new FileConfiguration();
foreach (FileInfo item in list)
{
if (list.Count <= 1 || !item.Name.Equals("ocelot.json", StringComparison.OrdinalIgnoreCase))
{
FileConfiguration fileConfiguration2 = JsonConvert.DeserializeObject<FileConfiguration>(File.ReadAllText(item.FullName));
if (fileConfiguration2 == null)
{
Log.Fatal($"Ocelot config file \"{item.FullName}\" is empty");
}
if (item.Name.Equals("ocelot.global.json", StringComparison.OrdinalIgnoreCase))
{
fileConfiguration.GlobalConfiguration = fileConfiguration2.GlobalConfiguration;
}
fileConfiguration.Aggregates.AddRange(fileConfiguration2.Aggregates);
fileConfiguration.Routes.AddRange(fileConfiguration2.Routes);
}
}
string contents = JsonConvert.SerializeObject(fileConfiguration, Formatting.Indented);
File.WriteAllText("ocelot.json", contents);
}
}
}

129
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.aggregate.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.aggregate.json

@ -1,67 +1,62 @@
{
"Aggregates": [
// ̬ۺ
{
"RouteKeys": [
"platform-api-definition",
"backend-admin-api-definition",
"messages-api-definition",
"ids-admin-api-definition",
"localization-api-definition",
"task-api-definition",
"webhook-api-definition"
],
"UpstreamPathTemplate": "/api/abp/api-definition",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
},
// þۺ
{
"RouteKeys": [
"platform-configuration",
"backend-admin-configuration",
"messages-configuration",
"ids-admin-configuration",
"localization-configuration",
"task-configuration"
],
"UpstreamPathTemplate": "/api/abp/application-configuration",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
},
// ȫ
{
"RouteKeys": [
"setting-global",
"wechat-setting-global",
"aliyun-setting-global",
"oss-management-setting-global"
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-global",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
},
//
{
"RouteKeys": [
"setting-current-tenant",
"wechat-setting-current-tenant",
"aliyun-setting-current-tenant",
"oss-management-setting-current-tenant"
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-tenant",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
},
// û
{
"RouteKeys": [
"assignables-notifilers",
"my-subscribes"
],
"UpstreamPathTemplate": "/api/my-subscribes/assignables-notifilers",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
}
]
}
{
"Aggregates": [
{
"RouteKeys": [
"platform-api-definition",
"backend-admin-api-definition",
"messages-api-definition",
"ids-admin-api-definition",
"localization-api-definition",
"task-api-definition",
"webhook-api-definition"
],
"UpstreamPathTemplate": "/api/abp/api-definition",
"Aggregator": "AbpResponseMergeAggregator"
},
{
"RouteKeys": [
"platform-configuration",
"backend-admin-configuration",
"messages-configuration",
"ids-admin-configuration",
"localization-configuration",
"task-configuration"
],
"UpstreamPathTemplate": "/api/abp/application-configuration",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
},
{
"RouteKeys": [
"setting-global",
"wechat-setting-global",
"tencent-cloud-setting-global",
"aliyun-setting-global",
"oss-management-setting-global"
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-global",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
},
{
"RouteKeys": [
"setting-current-tenant",
"wechat-setting-current-tenant",
"tencent-cloud-setting-current-tenant",
"aliyun-setting-current-tenant",
"oss-management-setting-current-tenant"
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-tenant",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
},
{
"RouteKeys": [
"setting-current-user"
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-user",
"Aggregator": "AbpResponseMergeAggregator",
"Priority": 99
}
]
}

1268
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.backendadmin.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.backendadmin.json

File diff suppressed because it is too large

48
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.global.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.global.json

@ -1,24 +1,24 @@
{
"GlobalConfiguration": {
"BaseUrl": "http://localhost:30000",
"DownstreamScheme": "HTTP",
"HttpHandlerOptions": {
"UseTracing": true
},
"RateLimitOptions": {
"DisableRateLimitHeaders": false,
"ClientIdHeader": "ClientId",
"RateLimitCounterPrefix": "ocelot",
"QuotaExceededMessage": "您的操作过快,请稍后再试!",
"HttpStatusCode": 429
},
"QoSOptions": {
"TimeoutValue": 30000,
"DurationOfBreak": 60000,
"ExceptionsAllowedBeforeBreaking": 30
},
"LoadBalancerOptions": {
"Type": "RoundRobin"
}
}
}
{
"GlobalConfiguration": {
"BaseUrl": "http://localhost:30000",
"DownstreamScheme": "HTTP",
"HttpHandlerOptions": {
"UseTracing": true
},
"RateLimitOptions": {
"DisableRateLimitHeaders": false,
"ClientIdHeader": "ClientId",
"RateLimitCounterPrefix": "ocelot",
"QuotaExceededMessage": "您的操作过快,请稍后再试!",
"HttpStatusCode": 429
},
"QoSOptions": {
"TimeoutValue": 30000,
"DurationOfBreak": 60000,
"ExceptionsAllowedBeforeBreaking": 30
},
"LoadBalancerOptions": {
"Type": "RoundRobin"
}
}
}

435
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.idsadmin.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.idsadmin.json

@ -1,180 +1,255 @@
{
"Routes": [
//
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/abp/ids-admin/application-configuration",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "ids-admin-configuration"
},
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/abp/ids-admin/api-definition",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "ids-admin-api-definition"
},
//
{
"DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/identity/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/api/identity-server/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/identity-server/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/account/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// API
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/ids-admin/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}
{
"Routes": [
//
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/abp/ids-admin/application-configuration",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "ids-admin-configuration"
},
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/abp/ids-admin/api-definition",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "ids-admin-api-definition"
},
//
{
"DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/identity/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/api/identity-server/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/identity-server/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/api/account/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/.well-known/openid-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 44385
}
],
"UpstreamPathTemplate": "/.well-known/openid-configuration",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/connect/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 44385
}
],
"UpstreamPathTemplate": "/connect/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// API
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30015
}
],
"UpstreamPathTemplate": "/ids-admin/v1/swagger.json",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}

247
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.localization.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.localization.json

@ -1,118 +1,129 @@
{
"Routes": [
//
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30030
}
],
"UpstreamPathTemplate": "/api/abp/localization/application-configuration",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "localization-configuration"
},
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30030
}
],
"UpstreamPathTemplate": "/api/abp/localization/api-definition",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "localization-api-definition"
},
//
{
"DownstreamPathTemplate": "/api/localization/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30030
}
],
"UpstreamPathTemplate": "/api/localization/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// API
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30030
}
],
"UpstreamPathTemplate": "/localization/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}
{
"Routes": [
//
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30030
}
],
"UpstreamPathTemplate": "/api/abp/localization/application-configuration",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "localization-configuration"
},
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30030
}
],
"UpstreamPathTemplate": "/api/abp/localization/api-definition",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "localization-api-definition"
},
//
{
"DownstreamPathTemplate": "/api/localization/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30030
}
],
"UpstreamPathTemplate": "/api/localization/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// API
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30030
}
],
"UpstreamPathTemplate": "/localization/v1/swagger.json",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}

714
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.messages.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.messages.json

@ -1,423 +1,291 @@
{
"Routes": [
// ܶ˵
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/abp/messages/application-configuration",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "messages-configuration"
},
// ̬ܶAPI˵
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/abp/messages/api-definition",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "messages-api-definition"
},
// ʱͨѶ
{
"DownstreamPathTemplate": "/api/im/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/im/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// Hangfire DZ
{
"DownstreamPathTemplate": "/hangfire/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/hangfire/{everything}",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/my-subscribes",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/my-subscribes",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Priority": 99
},
// û
{
"DownstreamPathTemplate": "/api/my-subscribes/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/my-subscribes/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// ûб
{
"DownstreamPathTemplate": "/api/my-subscribes/all",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/my-subscribes/all",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Priority": 99,
"Key": "my-subscribes"
},
// û֪ͨ
{
"DownstreamPathTemplate": "/api/notifications/my-notifilers/assignables",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/notifications/my-notifilers/assignables",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Priority": 99,
"Key": "assignables-notifilers"
},
// û֪ͨ
{
"DownstreamPathTemplate": "/api/notifications/my-notifilers",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/notifications/my-notifilers",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/notifications/my-notifilers/{id}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/notifications/my-notifilers/{id}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// API ĵ
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/messages/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/signalr-hubs/messages",
"DownstreamScheme": "ws",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/signalr-hubs/messages",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE", "OPTIONS" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {},
"DangerousAcceptAnyServerCertificateValidator": true,
"RouteIsCaseSensitive": false,
"Priority": 99
},
{
"DownstreamPathTemplate": "/signalr-hubs/notifications",
"DownstreamScheme": "ws",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/signalr-hubs/notifications",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE", "OPTIONS" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {},
"DangerousAcceptAnyServerCertificateValidator": true,
"RouteIsCaseSensitive": false,
"Priority": 99
},
{
"DownstreamPathTemplate": "/signalr-hubs/{everything}",
"DownstreamScheme": "ws",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/signalr-hubs/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE", "OPTIONS" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {},
"DangerousAcceptAnyServerCertificateValidator": true,
"RouteIsCaseSensitive": false
}
]
}
{
"Routes": [
//
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/abp/messages/application-configuration",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "messages-configuration"
},
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/abp/messages/api-definition",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "messages-api-definition"
},
//
{
"DownstreamPathTemplate": "/api/im/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/im/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// Hangfire
{
"DownstreamPathTemplate": "/hangfire/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/hangfire/{everything}",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/api/notifications/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/api/notifications/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// Api
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/messages/v1/swagger.json",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// signalr
{
"DownstreamPathTemplate": "/signalr-hubs/messages",
"DownstreamScheme": "ws",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/signalr-hubs/messages",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {},
"DangerousAcceptAnyServerCertificateValidator": true,
"RouteIsCaseSensitive": false,
"Priority": 99
},
{
"DownstreamPathTemplate": "/signalr-hubs/notifications",
"DownstreamScheme": "ws",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/signalr-hubs/notifications",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {},
"DangerousAcceptAnyServerCertificateValidator": true,
"RouteIsCaseSensitive": false,
"Priority": 99
},
{
"DownstreamPathTemplate": "/signalr-hubs/{everything}",
"DownstreamScheme": "ws",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30020
}
],
"UpstreamPathTemplate": "/signalr-hubs/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {},
"DangerousAcceptAnyServerCertificateValidator": true,
"RouteIsCaseSensitive": false
}
]
}

617
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.platform.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.platform.json

@ -1,314 +1,303 @@
{
"Routes": [
// ܶ˵
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/abp/platform/application-configuration",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "platform-configuration"
},
// ̬ܶAPI˵
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/abp/platform/api-definition",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "platform-api-definition"
},
//
{
"DownstreamPathTemplate": "/api/oss-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/oss-management/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// ƽ̨
{
"DownstreamPathTemplate": "/api/platform/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/platform/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// ļ
{
"DownstreamPathTemplate": "/api/files/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/files/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/files/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/api/files/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/task-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30040
}
],
"UpstreamPathTemplate": "/api/task-management/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "oss-management-setting-current-tenant"
},
// ȫ
{
"DownstreamPathTemplate": "/api/setting-management/oss-management/by-global",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/setting-management/oss-management/by-global",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "oss-management-setting-global"
},
// API ĵ
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/platform/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}
{
"Routes": [
//
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/abp/platform/application-configuration",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "platform-configuration"
},
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/abp/platform/api-definition",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "platform-api-definition"
},
// oss
{
"DownstreamPathTemplate": "/api/oss-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/oss-management/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/api/platform/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/platform/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
//
{
"DownstreamPathTemplate": "/api/files/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/files/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/files/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/api/files/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
// oss
{
"DownstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "oss-management-setting-current-tenant"
},
{
"DownstreamPathTemplate": "/api/setting-management/oss-management/by-global",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/api/setting-management/oss-management/by-global",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "oss-management-setting-global"
},
// Api
{
"DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30025
}
],
"UpstreamPathTemplate": "/platform/v1/swagger.json",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}

183
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.task.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.task.json

@ -1,87 +1,96 @@
{
"Routes": [
//
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30040
}
],
"UpstreamPathTemplate": "/api/abp/task/application-configuration",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "task-configuration"
},
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30040
}
],
"UpstreamPathTemplate": "/api/abp/task/api-definition",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "task-api-definition"
},
//
{
"DownstreamPathTemplate": "/api/task-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30040
}
],
"UpstreamPathTemplate": "/api/task-management/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}
{
"Routes": [
//
{
"DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30040
}
],
"UpstreamPathTemplate": "/api/abp/task/application-configuration",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "task-configuration"
},
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30040
}
],
"UpstreamPathTemplate": "/api/abp/task/api-definition",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "task-api-definition"
},
//
{
"DownstreamPathTemplate": "/api/task-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30040
}
],
"UpstreamPathTemplate": "/api/task-management/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}

121
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.webhook.json → gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.webhook.json

@ -1,59 +1,62 @@
{
"Routes": [
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30045
}
],
"UpstreamPathTemplate": "/api/abp/webhook/api-definition",
"UpstreamHttpMethod": [ "GET" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "webhook-api-definition"
},
{
"DownstreamPathTemplate": "/api/webhooks/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30045
}
],
"UpstreamPathTemplate": "/api/webhooks/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}
{
"Routes": [
// API
{
"DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30045
}
],
"UpstreamPathTemplate": "/api/abp/webhook/api-definition",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
},
"Key": "webhook-api-definition"
},
// webhooks
{
"DownstreamPathTemplate": "/api/webhooks/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30045
}
],
"UpstreamPathTemplate": "/api/webhooks/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 30000
},
"HttpHandlerOptions": {
"UseTracing": true
}
}
]
}

13
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Program.cs

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Ocelot.DependencyInjection;
using Serilog;
using System;
using System.IO;
@ -25,11 +26,13 @@ public class Program
.UseAutofac()
.ConfigureAppConfiguration((context, config) =>
{
// 加入 ocelot配置文件
config.AddJsonFile(
$"ocelot.{context.HostingEnvironment.EnvironmentName ?? "Development"}.json",
optional: true,
reloadOnChange: true);
//// 加入 ocelot配置文件
//config.AddJsonFile(
//$"ocelot.{context.HostingEnvironment.EnvironmentName ?? "Development"}.json",
//optional: true,
//reloadOnChange: true);
config.AddAutoOcelotConfig("OcelotConfig", builder.Environment);
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())

1895
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json

File diff suppressed because it is too large

4349
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.json

File diff suppressed because it is too large

26
starter/00.auto-config-docker.cmd

@ -0,0 +1,26 @@
docker network create --subnet=172.18.0.0/16 nt
docker pull mysql
docker volume rm mysql-data
docker volume rm mysql-log
docker volume create mysql-data
docker volume create mysql-log
docker run --ip 172.18.0.10 -d --name mysql --net nt -v mysql-log:/var/log/mysql -v mysql-data:/var/lib/mysql -p 3306:3306 -p 33060:33060 -e MYSQL_ROOT_PASSWORD=123456 -d mysql --init-connect="SET collation_connection=utf8mb4_0900_ai_ci" --init-connect="SET NAMES utf8mb4" --skip-character-set-client-handshake
docker pull rabbitmq:management
docker volume rm rabbitmq-home
docker volume create rabbitmq-home
docker run --ip 172.18.0.40 -d -id --name=rabbitmq --net nt -v rabbitmq-home:/var/lib/rabbitmq -p 15672:15672 -p 5672:5672 -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin rabbitmq:management
docker pull redis
docker volume rm redis-home
docker volume create redis-home
docker run --ip 172.18.0.50 -d --net nt -p 6379:6379 --name redis -v redis-home:/data redis
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.9.0
docker volume rm elasticsearch-home
docker volume create elasticsearch-home
docker run --ip 172.18.0.60 -d --name es --net nt -v elasticsearch-home:/usr/share/elasticsearch/data -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms1G -Xmx1G" -e xpack.security.enabled=false -p 9200:9200 -p 9300:9300 -it docker.elastic.co/elasticsearch/elasticsearch:8.9.0
docker pull docker.elastic.co/kibana/kibana:8.9.0
docker run --ip 172.18.0.70 -d --name kib --net nt -p 5601:5601 docker.elastic.co/kibana/kibana:8.9.0

4
starter/01.migrate-db.cmd

@ -0,0 +1,4 @@
@echo off
cd ..\aspnet-core
migrate-database.bat

4
starter/10.start-ids.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.IdentityServer identityserver --watchrun

4
starter/11.start-ids-admin.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.IdentityServer.HttpApi.Host identityserver4-admin --watchrun

4
starter/12.start-localization.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.LocalizationManagement.HttpApi.Host localization --watchrun

4
starter/13.start-platform.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.PlatformManagement.HttpApi.Host platform --watchrun

4
starter/14.start-messages.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.RealtimeMessage.HttpApi.Host messages --watchrun

4
starter/15.start-task-management.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.TaskManagement.HttpApi.Host task-management --watchrun

4
starter/16.start-webhooks-management.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.WebhooksManagement.HttpApi.Host webhooks-management--watchrun

4
starter/17.start-workflow-management.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.WorkflowManagement.HttpApi.Host workflow-management --watchrun

4
starter/18.start-admin.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-http-api-host.bat LY.MicroService.BackendAdmin.HttpApi.Host admin --watchrun

4
starter/70.start-internal-gateway.bat

@ -0,0 +1,4 @@
@echo off
cls
cd ..\aspnet-core\
.\start-internal-gateway.bat --watchrun

9
starter/80.start-host.cmd

@ -0,0 +1,9 @@
@echo off
cls
title start-all
set stime=12
for /f "delims=" %%i in ('dir *.bat /b') do (
echo %%i
start %%i
ping -n %stime% 127.1 >nul
)

6
starter/91.install-node-module.cmd

@ -0,0 +1,6 @@
@echo off
cls
cd ../apps/vue/
title install-module
pnpm install
pause

5
starter/99.start-ui.cmd

@ -0,0 +1,5 @@
@echo off
cls
cd ../apps/vue/
title abp-next-admin-ui
pnpm run dev

8
starter/readme.md

@ -0,0 +1,8 @@
快速启动后端项目:
1.使用 00.auto-config-docker.cmd 自动配置docker环境
2.使用 01.migrate-db.cmd 迁移数据库
3.使用 80.start-host.cmd 启动后端项目
注:请按自己电脑运行速度调整 80.start-host.cmd 文件中的 stime 参数。
快速启动前端项目:
1.使用 91.install-node-module.cmd 安装npm依赖
2.使用 99.start-all.cmd 启动项目
Loading…
Cancel
Save