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. 15
      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. 15
      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. 12
      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. 1
      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. 15
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.aggregate.json
  53. 436
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.backendadmin.json
  54. 0
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.global.json
  55. 107
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.idsadmin.json
  56. 31
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.localization.json
  57. 226
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.messages.json
  58. 99
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.platform.json
  59. 23
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/OcelotConfig/ocelot.task.json
  60. 23
      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. 4347
      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 npm run dev

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

@ -1,5 +1,5 @@
import { defAbpHttp } from '/@/utils/http/abp'; 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 remoteServiceName = 'LocalizationManagement';
const controllerName = 'Language'; const controllerName = 'Language';
@ -8,9 +8,10 @@ enum Api {
GetList = '/api/abp/localization/languages', GetList = '/api/abp/localization/languages',
} }
export const getList = () => { export const getList = (input: GetLanguageWithFilter) => {
return defAbpHttp.get<LanguageListResult>({ return defAbpHttp.get<LanguageListResult>({
url: Api.GetList, 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 { export interface GetLanguagePagedRequest extends PagedAndSortedResultRequestDto {
filter?: string; 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 { export interface GetResourcePagedRequest extends PagedAndSortedResultRequestDto {
filter?: string; 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 { 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 remoteServiceName = 'LocalizationManagement';
const controllerName = 'Resource'; const controllerName = 'Resource';
@ -8,9 +8,10 @@ enum Api {
GetList = '/api/abp/localization/resources', GetList = '/api/abp/localization/resources',
} }
export const getList = () => { export const getList = (input: GetResourceWithFilter) => {
return defAbpHttp.get<ResourceListResult>({ return defAbpHttp.get<ResourceListResult>({
url: Api.GetList, 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) { if ((config as Recordable)?.requestOptions?.withAcceptLanguage !== false) {
const localeStore = useLocaleStoreWithOut(); const localeStore = useLocaleStoreWithOut();
config.headers['Accept-Language'] = localeStore.getLocale; config.headers['Accept-Language'] = localeStore.getLocale;
if (config.headers['Accept-Language'] == 'zh_CN') {
config.headers['Accept-Language'] = 'zh-Hans';
}
} }
return config; return config;
}, },

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

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

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

@ -47,8 +47,10 @@
import { getList, GetAsyncByName, DeleteAsyncByName } from '/@/api/localization/resources'; import { getList, GetAsyncByName, DeleteAsyncByName } from '/@/api/localization/resources';
import { Resource } from '/@/api/localization/model/resourcesModel'; import { Resource } from '/@/api/localization/model/resourcesModel';
import { getDataColumns } from './TableData'; import { getDataColumns } from './TableData';
import { reactive } from 'vue';
import ResourceModal from './ResourceModal.vue'; import ResourceModal from './ResourceModal.vue';
const { createConfirm, createMessage } = useMessage(); const { createConfirm, createMessage } = useMessage();
const { L } = useLocalization(['LocalizationManagement', 'AbpLocalization', 'AbpUi']); const { L } = useLocalization(['LocalizationManagement', 'AbpLocalization', 'AbpUi']);
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
@ -72,7 +74,7 @@
component: 'Input', component: 'Input',
label: L('Search'), label: L('Search'),
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '', defaultValue: ''
}, },
], ],
submitFunc: fetchResources, submitFunc: fetchResources,
@ -87,8 +89,8 @@
function fetchResources() { function fetchResources() {
const form = getForm(); const form = getForm();
return form.validate().then(() => { return form.validate().then((input) => {
return getList().then((res) => { return getList(input).then((res) => {
setTableData(res.items); 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 { FormProps } from '/@/components/Form';
import { NotificationReadState } from '/@/api/messages/model/notificationsModel'; import { NotificationReadState } from '/@/api/messages/model/notificationsModel';
const { L } = useLocalization(['AbpMessageService', 'AbpUi']); const { L } = useLocalization(['AbpMessageService', 'Notifications', 'AbpUi']);
export function getSearchFormSchemas(): Partial<FormProps> { export function getSearchFormSchemas(): Partial<FormProps> {
return { 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 { BasicColumn } from '/@/components/Table';
import { formatToDateTime } from '/@/utils/dateUtil'; import { formatToDateTime } from '/@/utils/dateUtil';
const { L } = useLocalization('AbpMessageService'); const { L } = useLocalization('Notifications');
export function getDataColumns(): BasicColumn[] { export function getDataColumns(): BasicColumn[] {
return [ return [

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

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

25
aspnet-core/migrate-database.bat

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

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

@ -1,10 +1,9 @@
@echo off @echo off
cls
chcp 65001 chcp 65001
title %2 title %2
@echo %2 migration running @echo %2 migrating
cd .\migrations\%1 cd .\migrations\%1
@ -16,13 +15,17 @@ exit
:run :run
dotnet run dotnet run
pause goto end
exit
:restore :restore
dotnet restore dotnet restore
exit goto end
:efu :efu
dotnet ef databse update 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 IUserGroupStore UserGroupStore => LazyServiceProvider.LazyGetRequiredService<IUserGroupStore>();
protected AbpExceptionHandlingOptions ExceptionHandlingOptions => LazyServiceProvider.LazyGetRequiredService<IOptions<AbpExceptionHandlingOptions>>().Value;
public override async Task OnConnectedAsync() public override async Task OnConnectedAsync()
{ {
await base.OnConnectedAsync(); await base.OnConnectedAsync();
@ -167,8 +170,8 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs
{ {
var errorInfo = ErrorInfoConverter.Convert(ex, options => var errorInfo = ErrorInfoConverter.Convert(ex, options =>
{ {
options.SendExceptionsDetailsToClients = false; options.SendExceptionsDetailsToClients = ExceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = false; options.SendStackTraceToClients = ExceptionHandlingOptions.SendStackTraceToClients;
}); });
await SendMessageAsync( await SendMessageAsync(
@ -230,8 +233,8 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs
{ {
var errorInfo = ErrorInfoConverter.Convert(ex, options => var errorInfo = ErrorInfoConverter.Convert(ex, options =>
{ {
options.SendExceptionsDetailsToClients = false; options.SendExceptionsDetailsToClients = ExceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = false; options.SendStackTraceToClients = ExceptionHandlingOptions.SendStackTraceToClients;
}); });
if (!chatMessage.GroupId.IsNullOrWhiteSpace()) 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 AbpIMSignalROptions _options;
private readonly IHubContext<MessagesHub> _hubContext; private readonly IHubContext<MessagesHub> _hubContext;
private readonly AbpExceptionHandlingOptions _exceptionHandlingOptions;
public SignalRMessageSenderProvider( public SignalRMessageSenderProvider(
IHubContext<MessagesHub> hubContext, IHubContext<MessagesHub> hubContext,
IAbpLazyServiceProvider serviceProvider, IAbpLazyServiceProvider serviceProvider,
IOptions<AbpIMSignalROptions> options) IOptions<AbpIMSignalROptions> options,
IOptions<AbpExceptionHandlingOptions> exceptionHandlingOptions)
: base(serviceProvider) : base(serviceProvider)
{ {
_options = options.Value; _options = options.Value;
_exceptionHandlingOptions = exceptionHandlingOptions.Value;
_hubContext = hubContext; _hubContext = hubContext;
} }
@ -99,8 +102,8 @@ namespace LINGYUN.Abp.IM.SignalR.Messages
{ {
var errorInfo = errorInfoConverter.Convert(ex, options => var errorInfo = errorInfoConverter.Convert(ex, options =>
{ {
options.SendExceptionsDetailsToClients = false; options.SendExceptionsDetailsToClients = _exceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = false; options.SendStackTraceToClients = _exceptionHandlingOptions.SendStackTraceToClients;
}); });
if (!chatMessage.GroupId.IsNullOrWhiteSpace()) 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 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 public interface IResourceAppService : IApplicationService
{ {
Task<ListResultDto<ResourceDto>> GetListAsync(); Task<ListResultDto<ResourceDto>> GetListAsync(GetResourceWithFilterDto input);
} }
} }

15
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 Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Volo.Abp;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Localization.External;
namespace LINGYUN.Abp.AspNetCore.Mvc.Localization namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
{ {
@ -16,9 +24,12 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
_languageProvider = languageProvider; _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>( return new ListResultDto<LanguageDto>(
languages.Select(l => new 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] [HttpGet]
public virtual Task<ListResultDto<LanguageDto>> GetListAsync() public virtual Task<ListResultDto<LanguageDto>> GetListAsync(GetLanguageWithFilterDto input)
{ {
return _service.GetListAsync(); return _service.GetListAsync(input);
} }
} }
} }

12
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.AspNetCore.Authorization;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Volo.Abp;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
@ -23,12 +29,14 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization
_externalLocalizationStore = externalLocalizationStore; _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 var resources = _localizationOptions
.Resources .Resources
.WhereIf(!input.Filter.IsNullOrWhiteSpace(), x => x.Value.ResourceName.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0)
.Select(x => new ResourceDto .Select(x => new ResourceDto
{ {
Name = x.Value.ResourceName, 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] [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 /> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\Notifications\DynamicNotificationDefinitionStore.cs~RF299208b7.TMP" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Caching" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.Caching" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Ddd.Domain" 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 AbpOpenApiOptions _openApiOptions;
private readonly ICurrentClient _currentClient; private readonly ICurrentClient _currentClient;
private readonly IWebClientInfoProvider _clientInfoProvider; private readonly IWebClientInfoProvider _clientInfoProvider;
private readonly AbpExceptionHandlingOptions _exceptionHandlingOptions;
public OpenApiAuthorizationService( public OpenApiAuthorizationService(
IAppKeyStore appKeyStore, IAppKeyStore appKeyStore,
ICurrentClient currentClient, ICurrentClient currentClient,
IWebClientInfoProvider clientInfoProvider, IWebClientInfoProvider clientInfoProvider,
IOptionsMonitor<AbpOpenApiOptions> options) IOptionsMonitor<AbpOpenApiOptions> options,
IOptions<AbpExceptionHandlingOptions> exceptionHandlingOptions)
{ {
_appKeyStore = appKeyStore; _appKeyStore = appKeyStore;
_currentClient = currentClient; _currentClient = currentClient;
_clientInfoProvider = clientInfoProvider; _clientInfoProvider = clientInfoProvider;
_openApiOptions = options.CurrentValue; _openApiOptions = options.CurrentValue;
_exceptionHandlingOptions = exceptionHandlingOptions.Value;
} }
public async virtual Task<bool> AuthorizeAsync(HttpContext httpContext) public async virtual Task<bool> AuthorizeAsync(HttpContext httpContext)
@ -177,8 +180,8 @@ namespace LINGYUN.Abp.OpenApi.Authorization
var errorInfoConverter = context.RequestServices.GetRequiredService<IExceptionToErrorInfoConverter>(); var errorInfoConverter = context.RequestServices.GetRequiredService<IExceptionToErrorInfoConverter>();
var errorInfo = errorInfoConverter.Convert(exception, options => var errorInfo = errorInfoConverter.Convert(exception, options =>
{ {
options.SendExceptionsDetailsToClients = false; options.SendExceptionsDetailsToClients = _exceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = false; options.SendStackTraceToClients = _exceptionHandlingOptions.SendStackTraceToClients;
}); });
if (context.Request.CanAccept(MimeTypes.Application.Json) || 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 /> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\Rules\RulesEngine\IWorkflowsResolver.cs~RF3e2c1c6.TMP" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="RulesEngine" Version="4.0.0" /> <PackageReference Include="RulesEngine" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Json" Version="$(VoloAbpPackageVersion)" /> <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 /> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\TextTemplating\TextTemplateDefinitionAppService.cs~RF1f4f741d.TMP" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.Ddd.Application" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.AutoMapper" 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> <ItemGroup>
<PackageReference Include="Volo.Abp.Caching" Version="$(VoloAbpPackageVersion)" /> <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)" /> <PackageReference Include="Microsoft.Extensions.Http" Version="$(MicrosoftPackageVersion)" />
</ItemGroup> </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 LINGYUN.Abp.TuiJuhe.Localization;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Json.Newtonsoft; using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.Settings; using Volo.Abp.Settings;
@ -11,7 +11,7 @@ using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.TuiJuhe; namespace LINGYUN.Abp.TuiJuhe;
[DependsOn( [DependsOn(
typeof(AbpJsonNewtonsoftModule), typeof(AbpJsonSystemTextJsonModule),
typeof(AbpSettingsModule), typeof(AbpSettingsModule),
typeof(AbpCachingModule), typeof(AbpCachingModule),
typeof(AbpFeaturesLimitValidationModule))] 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; namespace LINGYUN.Abp.TuiJuhe;
@ -9,22 +9,22 @@ public class TuiJuheResult<TParam, TResult>
/// <summary> /// <summary>
/// 状态码 /// 状态码
/// </summary> /// </summary>
[JsonProperty("code")] [JsonPropertyName("code")]
public int Code { get; set; } public int Code { get; set; }
/// <summary> /// <summary>
/// 错误消息 /// 错误消息
/// </summary> /// </summary>
[JsonProperty("reason")] [JsonPropertyName("reason")]
public string Reason { get; set; } public string Reason { get; set; }
/// <summary> /// <summary>
/// 响应数据 /// 响应数据
/// </summary> /// </summary>
[JsonProperty("result")] [JsonPropertyName("result")]
public TResult Result { get; set; } public TResult Result { get; set; }
/// <summary> /// <summary>
/// 响应参数 /// 响应参数
/// </summary> /// </summary>
[JsonProperty("params")] [JsonPropertyName("params")]
public TParam Params { get; set; } public TParam Params { get; set; }
[JsonIgnore] [JsonIgnore]

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

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

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

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

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

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

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

@ -18,6 +18,7 @@ public class Program
{ {
try try
{ {
Console.Title = "LocalizationManagement.HttpApi.Host";
Log.Information("Starting LocalizationManagement.HttpApi.Host."); Log.Information("Starting LocalizationManagement.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args); 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.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
using StackExchange.Redis; using StackExchange.Redis;
using System; using System;
@ -164,10 +165,11 @@ public partial class PlatformManagementHttpApiHostModule
}); });
Configure<Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingOptions>(options => Configure<Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingOptions>(options =>
{ {
// 是否发送错误详情 // 是否发送错误详情
options.SendExceptionsDetailsToClients = false; options.SendExceptionsDetailsToClients = true;
}); options.SendStackTraceToClients = true;
});
} }
private void ConfigureAuditing(IConfiguration configuration) private void ConfigureAuditing(IConfiguration configuration)

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

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

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

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

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

@ -18,6 +18,7 @@ public class Program
{ {
try try
{ {
Console.Title = "TaskManagement.HttpApi.Host";
Log.Information("Starting TaskManagement.HttpApi.Host."); Log.Information("Starting TaskManagement.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args); 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( services.AddSwaggerGen(
options => 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.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName); options.CustomSchemaIds(type => type.FullName);
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme

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

@ -18,6 +18,7 @@ public class Program
{ {
try try
{ {
Console.Title = "Web.Host";
Log.Information("Starting web host."); Log.Information("Starting web host.");
var builder = WebApplication.CreateBuilder(args); 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.BackgroundTasks;
using LINGYUN.Abp.ExceptionHandling; using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Localization.CultureMap;
using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using LINGYUN.Abp.Webhooks; using LINGYUN.Abp.Webhooks;
@ -358,6 +359,19 @@ public partial class WebhooksManagementHttpApiHostModule
options.UsePersistence<WebhooksManagementResource>(); 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) 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 try
{ {
Console.Title = "WorkflowManagement.HttpApi.Host";
Log.Information("Starting WorkflowManagement.HttpApi.Host."); Log.Information("Starting WorkflowManagement.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);

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

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

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

@ -18,6 +18,7 @@ public class Program
{ {
try try
{ {
Console.Title = "IdentityServer";
Log.Information("Starting IdentityServer."); Log.Information("Starting IdentityServer.");
var builder = WebApplication.CreateBuilder(args); 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 ping -n %stime% 127.1 >nul
start .\start-http-api-host.bat LY.MicroService.WebhooksManagement.HttpApi.Host webhooks-management--run start .\start-http-api-host.bat LY.MicroService.WebhooksManagement.HttpApi.Host webhooks-management--run
ping -n %stime% 127.1 >nul 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 start .\start-http-api-host.bat LY.MicroService.WorkflowManagement.HttpApi.Host workflow-management --run
ping -n %stime% 127.1 >nul ping -n %stime% 127.1 >nul
start .\start-http-api-host.bat LY.MicroService.BackendAdmin.HttpApi.Host admin --run 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 cd .\services\%1
if '%3' equ '--publish' goto publish if '%3' equ '--publish' goto publish
if '%3' equ '--watchrun' goto watchrun
if '%3' equ '--run' goto run if '%3' equ '--run' goto run
if '%3' equ '--restore' goto restore if '%3' equ '--restore' goto restore
if '%3' equ '--ef-u' goto efu if '%3' equ '--ef-u' goto efu
@ -23,6 +24,10 @@ exit
dotnet run dotnet run
exit exit
:watchrun
dotnet watch run --no-restore
exit
:restore :restore
dotnet restore dotnet restore
exit exit

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

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

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

@ -19,6 +19,7 @@ public class Program
{ {
try try
{ {
Console.Title = "Web.Host";
Log.Information("Starting web host."); Log.Information("Starting web host.");
var builder = WebApplication.CreateBuilder(args); 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.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.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.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" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/"; Service = "internal-apigateway" }
[PsObject[]]$solutionArray = @() [PsObject[]]$solutionArray = @()

17
build/modules.dependencies.json

@ -1,6 +1,6 @@
[ [
{ {
"tag": "net6.0", "tag": "net7.0",
"dependencies": [ "dependencies": [
{ {
"service": "Backend-Admin", "service": "Backend-Admin",
@ -26,7 +26,10 @@
"LINGYUN.Platform.Domain.Shared.dll", "LINGYUN.Platform.Domain.Shared.dll",
"LINGYUN.Abp.Tencent.dll", "LINGYUN.Abp.Tencent.dll",
"LINGYUN.Abp.Tencent.QQ.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.Domain.Shared.dll",
"Volo.Abp.Users.Abstractions.dll", "Volo.Abp.Users.Abstractions.dll",
"LINGYUN.Abp.IdentityServer.Application.Contracts.dll", "LINGYUN.Abp.IdentityServer.Application.Contracts.dll",
"Volo.Abp.IdentityServer.Domain.Shared.dll", "Volo.Abp.IdentityServer.Domain.Shared.dll"
"Volo.Abp.Json.Newtonsoft.dll"
] ]
} }
] ]
@ -60,8 +62,6 @@
"LINGYUN.Abp.Account.Templates.dll", "LINGYUN.Abp.Account.Templates.dll",
"LINGYUN.Abp.Features.LimitValidation.dll", "LINGYUN.Abp.Features.LimitValidation.dll",
"LINGYUN.Abp.Features.LimitValidation.Redis.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.Abp.BackgroundTasks.Abstractions.dll",
"LINGYUN.Linq.Dynamic.Queryable.dll", "LINGYUN.Linq.Dynamic.Queryable.dll",
"LINGYUN.Abp.Dynamic.Queryable.Application.Contracts.dll", "LINGYUN.Abp.Dynamic.Queryable.Application.Contracts.dll",
@ -69,7 +69,10 @@
"LINGYUN.Abp.TaskManagement.Domain.Shared.dll", "LINGYUN.Abp.TaskManagement.Domain.Shared.dll",
"LINGYUN.Abp.Notifications.Core.dll", "LINGYUN.Abp.Notifications.Core.dll",
"LINGYUN.Abp.Notifications.Common.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);
}
}
}

15
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,6 +1,5 @@
{ {
"Aggregates": [ "Aggregates": [
// ̬ۺ
{ {
"RouteKeys": [ "RouteKeys": [
"platform-api-definition", "platform-api-definition",
@ -12,10 +11,8 @@
"webhook-api-definition" "webhook-api-definition"
], ],
"UpstreamPathTemplate": "/api/abp/api-definition", "UpstreamPathTemplate": "/api/abp/api-definition",
"Aggregator": "AbpResponseMergeAggregator", "Aggregator": "AbpResponseMergeAggregator"
"Priority": 99
}, },
// þۺ
{ {
"RouteKeys": [ "RouteKeys": [
"platform-configuration", "platform-configuration",
@ -29,11 +26,11 @@
"Aggregator": "AbpResponseMergeAggregator", "Aggregator": "AbpResponseMergeAggregator",
"Priority": 99 "Priority": 99
}, },
// ȫ
{ {
"RouteKeys": [ "RouteKeys": [
"setting-global", "setting-global",
"wechat-setting-global", "wechat-setting-global",
"tencent-cloud-setting-global",
"aliyun-setting-global", "aliyun-setting-global",
"oss-management-setting-global" "oss-management-setting-global"
], ],
@ -41,11 +38,11 @@
"Aggregator": "AbpResponseMergeAggregator", "Aggregator": "AbpResponseMergeAggregator",
"Priority": 99 "Priority": 99
}, },
//
{ {
"RouteKeys": [ "RouteKeys": [
"setting-current-tenant", "setting-current-tenant",
"wechat-setting-current-tenant", "wechat-setting-current-tenant",
"tencent-cloud-setting-current-tenant",
"aliyun-setting-current-tenant", "aliyun-setting-current-tenant",
"oss-management-setting-current-tenant" "oss-management-setting-current-tenant"
], ],
@ -53,13 +50,11 @@
"Aggregator": "AbpResponseMergeAggregator", "Aggregator": "AbpResponseMergeAggregator",
"Priority": 99 "Priority": 99
}, },
// û
{ {
"RouteKeys": [ "RouteKeys": [
"assignables-notifilers", "setting-current-user"
"my-subscribes"
], ],
"UpstreamPathTemplate": "/api/my-subscribes/assignables-notifilers", "UpstreamPathTemplate": "/api/setting-management/settings/by-current-user",
"Aggregator": "AbpResponseMergeAggregator", "Aggregator": "AbpResponseMergeAggregator",
"Priority": 99 "Priority": 99
} }

436
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

@ -1,6 +1,5 @@
{ {
"Routes": [ "Routes": [
// ܶ˵
{ {
"DownstreamPathTemplate": "/api/abp/application-configuration", "DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -11,7 +10,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/backend-admin/application-configuration", "UpstreamPathTemplate": "/api/abp/backend-admin/application-configuration",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -26,7 +27,6 @@
}, },
"Key": "backend-admin-configuration" "Key": "backend-admin-configuration"
}, },
// ̬ܶAPI˵
{ {
"DownstreamPathTemplate": "/api/abp/api-definition", "DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -37,7 +37,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/backend-admin/api-definition", "UpstreamPathTemplate": "/api/abp/backend-admin/api-definition",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -52,7 +54,6 @@
}, },
"Key": "backend-admin-api-definition" "Key": "backend-admin-api-definition"
}, },
//
{ {
"DownstreamPathTemplate": "/api/abp/multi-tenancy/{everything}", "DownstreamPathTemplate": "/api/abp/multi-tenancy/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -63,7 +64,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/multi-tenancy/{everything}", "UpstreamPathTemplate": "/api/abp/multi-tenancy/{everything}",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -77,9 +80,8 @@
"UseTracing": true "UseTracing": true
} }
}, },
//
{ {
"DownstreamPathTemplate": "/api/saas/{everything}", "DownstreamPathTemplate": "/api/tenant-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
@ -87,8 +89,13 @@
"Port": 30010 "Port": 30010
} }
], ],
"UpstreamPathTemplate": "/api/saas/{everything}", "UpstreamPathTemplate": "/api/tenant-management/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -97,7 +104,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -108,7 +115,6 @@
"UseTracing": true "UseTracing": true
} }
}, },
// Ȩ޹
{ {
"DownstreamPathTemplate": "/api/permission-management/{everything}", "DownstreamPathTemplate": "/api/permission-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -119,7 +125,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/permission-management/{everything}", "UpstreamPathTemplate": "/api/permission-management/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -128,7 +139,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -139,7 +150,6 @@
"UseTracing": true "UseTracing": true
} }
}, },
//
{ {
"DownstreamPathTemplate": "/api/setting-management/settings/by-current-tenant", "DownstreamPathTemplate": "/api/setting-management/settings/by-current-tenant",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -150,7 +160,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-tenant/app", "UpstreamPathTemplate": "/api/setting-management/settings/by-current-tenant/app",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -159,7 +171,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -171,7 +183,39 @@
}, },
"Key": "setting-current-tenant" "Key": "setting-current-tenant"
}, },
// ȫ {
"DownstreamPathTemplate": "/api/setting-management/settings/by-current-user",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-user/app",
"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": "setting-current-user"
},
{ {
"DownstreamPathTemplate": "/api/setting-management/settings/by-global", "DownstreamPathTemplate": "/api/setting-management/settings/by-global",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -182,7 +226,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/settings/by-global/app", "UpstreamPathTemplate": "/api/setting-management/settings/by-global/app",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -191,7 +237,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -203,7 +249,6 @@
}, },
"Key": "setting-global" "Key": "setting-global"
}, },
// ΢
{ {
"DownstreamPathTemplate": "/api/setting-management/wechat/by-current-tenant", "DownstreamPathTemplate": "/api/setting-management/wechat/by-current-tenant",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -214,7 +259,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/wechat/by-current-tenant", "UpstreamPathTemplate": "/api/setting-management/wechat/by-current-tenant",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -223,7 +270,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -235,7 +282,6 @@
}, },
"Key": "wechat-setting-current-tenant" "Key": "wechat-setting-current-tenant"
}, },
// ΢ȫ
{ {
"DownstreamPathTemplate": "/api/setting-management/wechat/by-global", "DownstreamPathTemplate": "/api/setting-management/wechat/by-global",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -246,7 +292,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/wechat/by-global", "UpstreamPathTemplate": "/api/setting-management/wechat/by-global",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -255,7 +303,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -267,7 +315,72 @@
}, },
"Key": "wechat-setting-global" "Key": "wechat-setting-global"
}, },
// {
"DownstreamPathTemplate": "/api/setting-management/tencent-cloud/by-current-tenant",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/setting-management/tencent-cloud/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": "tencent-cloud-setting-current-tenant"
},
{
"DownstreamPathTemplate": "/api/setting-management/tencent-cloud/by-global",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/setting-management/tencent-cloud/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": "tencent-cloud-setting-global"
},
{ {
"DownstreamPathTemplate": "/api/setting-management/aliyun/by-current-tenant", "DownstreamPathTemplate": "/api/setting-management/aliyun/by-current-tenant",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -278,7 +391,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/aliyun/by-current-tenant", "UpstreamPathTemplate": "/api/setting-management/aliyun/by-current-tenant",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -287,7 +402,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -299,7 +414,6 @@
}, },
"Key": "aliyun-setting-current-tenant" "Key": "aliyun-setting-current-tenant"
}, },
// ȫ
{ {
"DownstreamPathTemplate": "/api/setting-management/aliyun/by-global", "DownstreamPathTemplate": "/api/setting-management/aliyun/by-global",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -310,7 +424,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/aliyun/by-global", "UpstreamPathTemplate": "/api/setting-management/aliyun/by-global",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -319,7 +435,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -331,7 +447,102 @@
}, },
"Key": "aliyun-setting-global" "Key": "aliyun-setting-global"
}, },
// ù {
"DownstreamPathTemplate": "/api/setting-management/settings/change-global",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/setting-management/settings/change-global",
"UpstreamHttpMethod": [
"PUT"
],
"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/setting-management/settings/change-current-tenant",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/setting-management/settings/change-current-tenant",
"UpstreamHttpMethod": [
"PUT"
],
"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/setting-management/settings/change-current-user",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/setting-management/settings/change-current-user",
"UpstreamHttpMethod": [
"PUT"
],
"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/setting-management/{everything}", "DownstreamPathTemplate": "/api/setting-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -342,7 +553,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/{everything}", "UpstreamPathTemplate": "/api/setting-management/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -362,7 +578,6 @@
"UseTracing": true "UseTracing": true
} }
}, },
// Թ
{ {
"DownstreamPathTemplate": "/api/feature-management/{everything}", "DownstreamPathTemplate": "/api/feature-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -373,7 +588,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/feature-management/{everything}", "UpstreamPathTemplate": "/api/feature-management/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -382,7 +602,42 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/saas/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/saas/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -393,7 +648,6 @@
"UseTracing": true "UseTracing": true
} }
}, },
// ־
{ {
"DownstreamPathTemplate": "/api/auditing/{everything}", "DownstreamPathTemplate": "/api/auditing/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -404,7 +658,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/auditing/{everything}", "UpstreamPathTemplate": "/api/auditing/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -413,7 +672,97 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 10000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/text-templating/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/text-templating/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 30000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/caching-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/caching-management/{everything}",
"UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {},
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000,
"TimeoutValue": 30000
},
"HttpHandlerOptions": {
"UseTracing": true
}
},
{
"DownstreamPathTemplate": "/api/abp/localization/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "127.0.0.1",
"Port": 30010
}
],
"UpstreamPathTemplate": "/api/abp/localization/{everything}",
"UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"RateLimitOptions": {
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -424,7 +773,6 @@
"UseTracing": true "UseTracing": true
} }
}, },
// API ĵ
{ {
"DownstreamPathTemplate": "/swagger/v1/swagger.json", "DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -435,7 +783,9 @@
} }
], ],
"UpstreamPathTemplate": "/admin/v1/swagger.json", "UpstreamPathTemplate": "/admin/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -444,7 +794,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,

0
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

107
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,6 +1,6 @@
{ {
"Routes": [ "Routes": [
// //
{ {
"DownstreamPathTemplate": "/api/abp/application-configuration", "DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -11,7 +11,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/ids-admin/application-configuration", "UpstreamPathTemplate": "/api/abp/ids-admin/application-configuration",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -26,7 +28,7 @@
}, },
"Key": "ids-admin-configuration" "Key": "ids-admin-configuration"
}, },
// API // API
{ {
"DownstreamPathTemplate": "/api/abp/api-definition", "DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -37,7 +39,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/ids-admin/api-definition", "UpstreamPathTemplate": "/api/abp/ids-admin/api-definition",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -52,7 +56,7 @@
}, },
"Key": "ids-admin-api-definition" "Key": "ids-admin-api-definition"
}, },
// //
{ {
"DownstreamPathTemplate": "/api/identity/{everything}", "DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -63,7 +67,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/identity/{everything}", "UpstreamPathTemplate": "/api/identity/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -72,7 +81,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -83,7 +92,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
// //
{ {
"DownstreamPathTemplate": "/api/identity-server/{everything}", "DownstreamPathTemplate": "/api/identity-server/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -94,7 +103,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/identity-server/{everything}", "UpstreamPathTemplate": "/api/identity-server/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -103,7 +117,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -114,7 +128,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
// //
{ {
"DownstreamPathTemplate": "/api/account/{everything}", "DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -125,7 +139,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/account/{everything}", "UpstreamPathTemplate": "/api/account/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -134,8 +153,62 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "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": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000, "DurationOfBreak": 1000,
@ -145,7 +218,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
// API // API
{ {
"DownstreamPathTemplate": "/swagger/v1/swagger.json", "DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -156,7 +229,9 @@
} }
], ],
"UpstreamPathTemplate": "/ids-admin/v1/swagger.json", "UpstreamPathTemplate": "/ids-admin/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -165,7 +240,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,

31
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,6 +1,6 @@
{ {
"Routes": [ "Routes": [
// //
{ {
"DownstreamPathTemplate": "/api/abp/application-configuration", "DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -11,7 +11,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/localization/application-configuration", "UpstreamPathTemplate": "/api/abp/localization/application-configuration",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -26,7 +28,7 @@
}, },
"Key": "localization-configuration" "Key": "localization-configuration"
}, },
// API // API
{ {
"DownstreamPathTemplate": "/api/abp/api-definition", "DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -37,7 +39,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/localization/api-definition", "UpstreamPathTemplate": "/api/abp/localization/api-definition",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -52,7 +56,7 @@
}, },
"Key": "localization-api-definition" "Key": "localization-api-definition"
}, },
// //
{ {
"DownstreamPathTemplate": "/api/localization/{everything}", "DownstreamPathTemplate": "/api/localization/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -63,7 +67,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/localization/{everything}", "UpstreamPathTemplate": "/api/localization/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -72,7 +81,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -83,7 +92,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
// API // API
{ {
"DownstreamPathTemplate": "/swagger/v1/swagger.json", "DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -94,7 +103,9 @@
} }
], ],
"UpstreamPathTemplate": "/localization/v1/swagger.json", "UpstreamPathTemplate": "/localization/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -103,7 +114,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,

226
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,6 +1,6 @@
{ {
"Routes": [ "Routes": [
// ܶ˵ //
{ {
"DownstreamPathTemplate": "/api/abp/application-configuration", "DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -11,7 +11,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/messages/application-configuration", "UpstreamPathTemplate": "/api/abp/messages/application-configuration",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -26,7 +28,7 @@
}, },
"Key": "messages-configuration" "Key": "messages-configuration"
}, },
// ̬ܶAPI˵ // API
{ {
"DownstreamPathTemplate": "/api/abp/api-definition", "DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -37,7 +39,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/messages/api-definition", "UpstreamPathTemplate": "/api/abp/messages/api-definition",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -52,7 +56,7 @@
}, },
"Key": "messages-api-definition" "Key": "messages-api-definition"
}, },
// ʱͨѶ //
{ {
"DownstreamPathTemplate": "/api/im/{everything}", "DownstreamPathTemplate": "/api/im/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -63,67 +67,6 @@
} }
], ],
"UpstreamPathTemplate": "/api/im/{everything}", "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": [ "UpstreamHttpMethod": [
"GET", "GET",
"POST", "POST",
@ -138,39 +81,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
},
"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": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -181,42 +92,9 @@
"UseTracing": true "UseTracing": true
} }
}, },
// ûб // Hangfire
{ {
"DownstreamPathTemplate": "/api/my-subscribes/all", "DownstreamPathTemplate": "/hangfire/{everything}",
"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", "DownstreamScheme": "http",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
@ -224,41 +102,10 @@
"Port": 30020 "Port": 30020
} }
], ],
"UpstreamPathTemplate": "/api/notifications/my-notifilers/assignables", "UpstreamPathTemplate": "/hangfire/{everything}",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"LoadBalancerOptions": { "GET"
"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": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -267,7 +114,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -278,8 +125,9 @@
"UseTracing": true "UseTracing": true
} }
}, },
//
{ {
"DownstreamPathTemplate": "/api/notifications/my-notifilers/{id}", "DownstreamPathTemplate": "/api/notifications/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
@ -287,7 +135,7 @@
"Port": 30020 "Port": 30020
} }
], ],
"UpstreamPathTemplate": "/api/notifications/my-notifilers/{id}", "UpstreamPathTemplate": "/api/notifications/{everything}",
"UpstreamHttpMethod": [ "UpstreamHttpMethod": [
"GET", "GET",
"POST", "POST",
@ -302,7 +150,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -313,7 +161,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
// API ĵ // Api
{ {
"DownstreamPathTemplate": "/swagger/v1/swagger.json", "DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -324,7 +172,9 @@
} }
], ],
"UpstreamPathTemplate": "/messages/v1/swagger.json", "UpstreamPathTemplate": "/messages/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -333,7 +183,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -344,7 +194,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
// // signalr
{ {
"DownstreamPathTemplate": "/signalr-hubs/messages", "DownstreamPathTemplate": "/signalr-hubs/messages",
"DownstreamScheme": "ws", "DownstreamScheme": "ws",
@ -355,7 +205,13 @@
} }
], ],
"UpstreamPathTemplate": "/signalr-hubs/messages", "UpstreamPathTemplate": "/signalr-hubs/messages",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE", "OPTIONS" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -380,7 +236,13 @@
} }
], ],
"UpstreamPathTemplate": "/signalr-hubs/notifications", "UpstreamPathTemplate": "/signalr-hubs/notifications",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE", "OPTIONS" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -405,7 +267,13 @@
} }
], ],
"UpstreamPathTemplate": "/signalr-hubs/{everything}", "UpstreamPathTemplate": "/signalr-hubs/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE", "OPTIONS" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },

99
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,6 +1,6 @@
{ {
"Routes": [ "Routes": [
// ܶ˵ //
{ {
"DownstreamPathTemplate": "/api/abp/application-configuration", "DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -11,7 +11,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/platform/application-configuration", "UpstreamPathTemplate": "/api/abp/platform/application-configuration",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -26,7 +28,7 @@
}, },
"Key": "platform-configuration" "Key": "platform-configuration"
}, },
// ̬ܶAPI˵ // API
{ {
"DownstreamPathTemplate": "/api/abp/api-definition", "DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -37,7 +39,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/platform/api-definition", "UpstreamPathTemplate": "/api/abp/platform/api-definition",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -52,7 +56,7 @@
}, },
"Key": "platform-api-definition" "Key": "platform-api-definition"
}, },
// // oss
{ {
"DownstreamPathTemplate": "/api/oss-management/{everything}", "DownstreamPathTemplate": "/api/oss-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -63,7 +67,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/oss-management/{everything}", "UpstreamPathTemplate": "/api/oss-management/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -72,7 +81,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -83,7 +92,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
// ƽ̨ //
{ {
"DownstreamPathTemplate": "/api/platform/{everything}", "DownstreamPathTemplate": "/api/platform/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -94,38 +103,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/platform/{everything}", "UpstreamPathTemplate": "/api/platform/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"LoadBalancerOptions": { "GET",
"Type": "RoundRobin" "POST",
}, "PUT",
"RateLimitOptions": { "DELETE"
"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": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -134,7 +117,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -145,6 +128,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
//
{ {
"DownstreamPathTemplate": "/api/files/{everything}", "DownstreamPathTemplate": "/api/files/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -154,7 +138,7 @@
"Port": 30025 "Port": 30025
} }
], ],
"UpstreamPathTemplate": "/api/api/files/{everything}", "UpstreamPathTemplate": "/api/files/{everything}",
"UpstreamHttpMethod": [ "UpstreamHttpMethod": [
"GET", "GET",
"POST", "POST",
@ -169,7 +153,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -181,15 +165,15 @@
} }
}, },
{ {
"DownstreamPathTemplate": "/api/task-management/{everything}", "DownstreamPathTemplate": "/api/files/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "127.0.0.1", "Host": "127.0.0.1",
"Port": 30040 "Port": 30025
} }
], ],
"UpstreamPathTemplate": "/api/task-management/{everything}", "UpstreamPathTemplate": "/api/api/files/{everything}",
"UpstreamHttpMethod": [ "UpstreamHttpMethod": [
"GET", "GET",
"POST", "POST",
@ -204,7 +188,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -215,7 +199,7 @@
"UseTracing": true "UseTracing": true
} }
}, },
// // oss
{ {
"DownstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant", "DownstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -226,7 +210,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant", "UpstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -235,7 +221,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -247,7 +233,6 @@
}, },
"Key": "oss-management-setting-current-tenant" "Key": "oss-management-setting-current-tenant"
}, },
// ȫ
{ {
"DownstreamPathTemplate": "/api/setting-management/oss-management/by-global", "DownstreamPathTemplate": "/api/setting-management/oss-management/by-global",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -258,7 +243,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/oss-management/by-global", "UpstreamPathTemplate": "/api/setting-management/oss-management/by-global",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -267,7 +254,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
@ -279,7 +266,7 @@
}, },
"Key": "oss-management-setting-global" "Key": "oss-management-setting-global"
}, },
// API ĵ // Api
{ {
"DownstreamPathTemplate": "/swagger/v1/swagger.json", "DownstreamPathTemplate": "/swagger/v1/swagger.json",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -290,7 +277,9 @@
} }
], ],
"UpstreamPathTemplate": "/platform/v1/swagger.json", "UpstreamPathTemplate": "/platform/v1/swagger.json",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -299,7 +288,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,

23
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,6 +1,6 @@
{ {
"Routes": [ "Routes": [
// //
{ {
"DownstreamPathTemplate": "/api/abp/application-configuration", "DownstreamPathTemplate": "/api/abp/application-configuration",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -11,7 +11,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/task/application-configuration", "UpstreamPathTemplate": "/api/abp/task/application-configuration",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -26,7 +28,7 @@
}, },
"Key": "task-configuration" "Key": "task-configuration"
}, },
// API // API
{ {
"DownstreamPathTemplate": "/api/abp/api-definition", "DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -37,7 +39,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/task/api-definition", "UpstreamPathTemplate": "/api/abp/task/api-definition",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -52,7 +56,7 @@
}, },
"Key": "task-api-definition" "Key": "task-api-definition"
}, },
// //
{ {
"DownstreamPathTemplate": "/api/task-management/{everything}", "DownstreamPathTemplate": "/api/task-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -63,7 +67,12 @@
} }
], ],
"UpstreamPathTemplate": "/api/task-management/{everything}", "UpstreamPathTemplate": "/api/task-management/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -72,7 +81,7 @@
"EnableRateLimiting": true, "EnableRateLimiting": true,
"Period": "1s", "Period": "1s",
"PeriodTimespan": 1, "PeriodTimespan": 1,
"Limit": 5 "Limit": 100
}, },
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,

23
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,5 +1,6 @@
{ {
"Routes": [ "Routes": [
// API
{ {
"DownstreamPathTemplate": "/api/abp/api-definition", "DownstreamPathTemplate": "/api/abp/api-definition",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -10,7 +11,9 @@
} }
], ],
"UpstreamPathTemplate": "/api/abp/webhook/api-definition", "UpstreamPathTemplate": "/api/abp/webhook/api-definition",
"UpstreamHttpMethod": [ "GET" ], "UpstreamHttpMethod": [
"GET"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
@ -25,6 +28,7 @@
}, },
"Key": "webhook-api-definition" "Key": "webhook-api-definition"
}, },
// webhooks
{ {
"DownstreamPathTemplate": "/api/webhooks/{everything}", "DownstreamPathTemplate": "/api/webhooks/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@ -35,21 +39,20 @@
} }
], ],
"UpstreamPathTemplate": "/api/webhooks/{everything}", "UpstreamPathTemplate": "/api/webhooks/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ], "UpstreamHttpMethod": [
"GET",
"POST",
"PUT",
"DELETE"
],
"LoadBalancerOptions": { "LoadBalancerOptions": {
"Type": "RoundRobin" "Type": "RoundRobin"
}, },
"RateLimitOptions": { "RateLimitOptions": {},
"ClientWhitelist": [],
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 5
},
"QoSOptions": { "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 10, "ExceptionsAllowedBeforeBreaking": 10,
"DurationOfBreak": 1000, "DurationOfBreak": 1000,
"TimeoutValue": 10000 "TimeoutValue": 30000
}, },
"HttpHandlerOptions": { "HttpHandlerOptions": {
"UseTracing": true "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.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Ocelot.DependencyInjection;
using Serilog; using Serilog;
using System; using System;
using System.IO; using System.IO;
@ -25,11 +26,13 @@ public class Program
.UseAutofac() .UseAutofac()
.ConfigureAppConfiguration((context, config) => .ConfigureAppConfiguration((context, config) =>
{ {
// 加入 ocelot配置文件 //// 加入 ocelot配置文件
config.AddJsonFile( //config.AddJsonFile(
$"ocelot.{context.HostingEnvironment.EnvironmentName ?? "Development"}.json", //$"ocelot.{context.HostingEnvironment.EnvironmentName ?? "Development"}.json",
optional: true, //optional: true,
reloadOnChange: true); //reloadOnChange: true);
config.AddAutoOcelotConfig("OcelotConfig", builder.Environment);
var configuration = config.Build(); var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists()) 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

4347
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