create-dp-koa 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/package.json +1 -1
  2. package/template/scripts/sync-template.mjs +20 -0
  3. package/template/src/app.ts +1 -2
  4. package/template/src/{framework/plugins → plugins}/registry.ts +2 -2
  5. package/template/src/plugins/weboffice/http/routes.ts +1 -1
  6. package/template/src/plugins/weboffice/index.ts +3 -3
  7. package/template/src/plugins/weboffice/services/webofficeCallback.service.ts +3 -4
  8. package/template/src/utils/testDataInitializer.ts +1 -1
  9. package/template/tsconfig.json +6 -0
  10. package/template/src/annotations/decorators/ConfigManagement.ts +0 -9
  11. package/template/src/annotations/decorators/DistributedTracing.ts +0 -9
  12. package/template/src/annotations/decorators/EnterprisePerformance.ts +0 -9
  13. package/template/src/annotations/decorators/PerformanceMonitor.ts +0 -32
  14. package/template/src/annotations/decorators/SecurityAudit.ts +0 -9
  15. package/template/src/annotations/index.ts +0 -50
  16. package/template/src/annotations/processors/ConfigManagementProcessor.ts +0 -369
  17. package/template/src/annotations/processors/DistributedTracingProcessor.ts +0 -288
  18. package/template/src/annotations/processors/EnterprisePerformanceProcessor.ts +0 -189
  19. package/template/src/annotations/processors/PerformanceMonitorProcessor.ts +0 -101
  20. package/template/src/annotations/processors/SecurityAuditProcessor.ts +0 -345
  21. package/template/src/annotations/processors/SwaggerProcessor.ts +0 -612
  22. package/template/src/annotations/processors/index.ts +0 -10
  23. package/template/src/examples/InterceptorExampleRunner.ts +0 -284
  24. package/template/src/examples/ServiceInterceptorExample.ts +0 -214
  25. package/template/src/examples/cacheExamples.ts +0 -155
  26. package/template/src/framework/decorator/controller.ts +0 -311
  27. package/template/src/framework/decorator/processor/AnnotationDecorators.ts +0 -100
  28. package/template/src/framework/decorator/processor/AnnotationProcessor.ts +0 -160
  29. package/template/src/framework/decorator/processor/AnnotationProcessorConfig.ts +0 -45
  30. package/template/src/framework/decorator/processor/AnnotationRegistry.ts +0 -117
  31. package/template/src/framework/decorator/processor/AnnotationSystemInitializer.ts +0 -95
  32. package/template/src/framework/decorator/processor/ProcessorManager.ts +0 -76
  33. package/template/src/framework/decorator/processor/processors/CustomProcessors.ts +0 -126
  34. package/template/src/framework/decorator/processor/processors/DefaultProcessors.ts +0 -207
  35. package/template/src/framework/decorator/refactored/DecoratorFactory.ts +0 -99
  36. package/template/src/framework/decorator/refactored/DecoratorMetadataManager.ts +0 -125
  37. package/template/src/framework/decorator/refactored/DecoratorValidator.ts +0 -128
  38. package/template/src/framework/decorator/refactored/TypeSafeDecorators.ts +0 -139
  39. package/template/src/framework/decorator/refactored/index.ts +0 -98
  40. package/template/src/framework/decorator/swagger.ts +0 -150
  41. package/template/src/framework/interceptors/AdvancedServiceCallInterceptor.ts +0 -375
  42. package/template/src/framework/interceptors/ServiceCallInterceptor.ts +0 -348
  43. package/template/src/framework/interceptors/index.ts +0 -19
  44. package/template/src/framework/plugins/types.ts +0 -15
  45. package/template/src/framework/types/ServiceResult.ts +0 -151
  46. package/template/src/framework/types/index.ts +0 -16
  47. package/template/src/framework/utils/CacheManager.ts +0 -430
  48. package/template/src/framework/utils/CacheService.ts +0 -248
  49. package/template/src/framework/utils/DtoValidator.ts +0 -164
  50. package/template/src/framework/utils/MigrationHelper.ts +0 -179
  51. package/template/src/framework/utils/MigrationManager.ts +0 -256
  52. package/template/src/framework/utils/NewRouter.ts +0 -207
  53. package/template/src/framework/utils/TransactionManager.ts +0 -172
  54. package/template/src/framework/utils/bootstrap.ts +0 -445
  55. package/template/src/framework/utils/cache.ts +0 -269
  56. package/template/src/framework/utils/databaseConfig.ts +0 -148
  57. package/template/src/framework/utils/db.ts +0 -39
  58. package/template/src/framework/utils/dbMonitor.ts +0 -106
  59. package/template/src/framework/utils/function.ts +0 -61
  60. package/template/src/framework/utils/gracefulShutdown.ts +0 -131
  61. package/template/src/framework/utils/logger.ts +0 -388
  62. package/template/src/framework/utils/metrics.ts +0 -182
  63. package/template/src/framework/utils/router.ts +0 -417
  64. package/template/src/framework/utils/swagger.ts +0 -184
  65. package/template/src/framework/utils/testDb.ts +0 -19
  66. package/template/src/framework/utils/token.ts +0 -23
  67. package/template/src/framework/utils/transform.ts +0 -17
  68. package/template/src/libs/aokEmailSender.ts +0 -42
  69. package/template/src/libs/captcha.ts +0 -37
  70. package/template/src/libs/cos.ts +0 -45
  71. package/template/src/libs/mCache.ts +0 -7
  72. package/template/src/libs/serviceValidate.ts +0 -3
  73. package/template/src/libs/tecentSms.ts +0 -51
  74. package/template/src/middlewares/a.middleware.ts +0 -6
  75. package/template/src/middlewares/error.middleware.ts +0 -14
  76. package/template/src/middlewares/logging.middleware.ts +0 -187
  77. package/template/src/middlewares/static.middleware.ts +0 -79
  78. package/template/src/middlewares/swagger.middleware.ts +0 -70
  79. package/template/src/middlewares/token.middleware.ts +0 -32
  80. package/template/src/migrations/1700000000000-InitialDatabaseStructure.ts +0 -172
  81. package/template/src/migrations/index.ts +0 -6
  82. package/template/src/repository/base/BaseRepository.ts +0 -124
  83. package/template/src/repository/interfaces/IBaseRepository.ts +0 -67
  84. package/template/src/service/base.service.ts +0 -116
@@ -1,311 +0,0 @@
1
-
2
- export function Post(url?: string): MethodDecorator {
3
- return (target: any,
4
- methodName: any,
5
- propertyDescriptor: PropertyDescriptor) => {
6
- if (!target.$_PostMethods) {
7
- target.$_PostMethods = new Set();
8
- }
9
- target.$_PostMethods.add({
10
- methodName,
11
- url: url ?? methodName
12
- })
13
- }
14
- }
15
-
16
- export function Get(url?: string): MethodDecorator {
17
- return (target: any,
18
- methodName: any,
19
- propertyDescriptor: PropertyDescriptor) => {
20
- if (!target.$_GetMethods) {
21
- target.$_GetMethods = new Set();
22
- }
23
- target.$_GetMethods.add({
24
- methodName,
25
- url: url ?? methodName
26
- })
27
- }
28
- }
29
-
30
- export function Put(url?: string): MethodDecorator {
31
- return (target: any,
32
- methodName: any,
33
- propertyDescriptor: PropertyDescriptor) => {
34
- if (!target.$_PutMethods) {
35
- target.$_PutMethods = new Set();
36
- }
37
- target.$_PutMethods.add({
38
- methodName,
39
- url: url ?? methodName
40
- })
41
- }
42
- }
43
-
44
- export function Del(url?: string): MethodDecorator {
45
- return (target: any,
46
- methodName: any,
47
- propertyDescriptor: PropertyDescriptor) => {
48
- if (!target.$_DelMethods) {
49
- target.$_DelMethods = new Set();
50
- }
51
- target.$_DelMethods.add({
52
- methodName,
53
- url: url ?? methodName
54
- })
55
- }
56
- }
57
-
58
- export function All(url?: string): MethodDecorator {
59
- return (target: any,
60
- methodName: any,
61
- propertyDescriptor: PropertyDescriptor) => {
62
- if (!target.$_AllMethods) {
63
- target.$_AllMethods = new Set();
64
- }
65
- target.$_AllMethods.add({
66
- methodName,
67
- url: url ?? methodName
68
- })
69
- }
70
- }
71
-
72
- export function ResponseCode(code = 200): MethodDecorator {
73
- return (target: any,
74
- methodName: any,
75
- propertyDescriptor: PropertyDescriptor) => {
76
- if (!target.$_ResponseCode) {
77
- target.$_ResponseCode = new Map<string, number>();
78
- }
79
- target.$_ResponseCode.set(methodName, code);
80
- }
81
- }
82
-
83
- export function ResponseHeader(type: string, value: any): MethodDecorator {
84
- return (target: any,
85
- methodName: any,
86
- propertyDescriptor: PropertyDescriptor) => {
87
- if (!target.$_ResponseHeader) {
88
- target.$_ResponseHeader = new Map<string, Map<string, any>>();
89
- }
90
- let headerMap = target.$_ResponseHeader.get(methodName);
91
- if (!headerMap) {
92
- headerMap = new Map<string, any>()
93
- }
94
- headerMap.set(type, value)
95
- target.$_ResponseHeader.set(methodName, headerMap);
96
- }
97
- }
98
-
99
- /**
100
- *
101
- * @param clas
102
- * @param objectKey 验证的数据对象所处的key
103
- * @returns
104
- */
105
- export function ResponseValidator(clas: any, objectKey: string = ""): MethodDecorator {
106
- return (target: any,
107
- methodName: any,
108
- propertyDescriptor: PropertyDescriptor) => {
109
- if (!target.$_ResponseValidator) {
110
- target.$_ResponseValidator = new Map<string, any>();
111
- }
112
- target.$_ResponseValidator.set(methodName, {
113
- clas,
114
- objectKey
115
- });
116
- }
117
- }
118
-
119
-
120
- /**
121
- *
122
- * @param fn 只有这里的函数有返回数据才会进入校验环节
123
- * @returns
124
- */
125
- export function ResponseValidateIf(clas: any, fn: (data: any) => any,): MethodDecorator {
126
- return (target: any,
127
- methodName: any,
128
- propertyDescriptor: PropertyDescriptor) => {
129
- if (!target.$_ResponseValidateIf) {
130
- target.$_ResponseValidateIf = new Map<string, any>();
131
- }
132
- target.$_ResponseValidateIf.set(methodName, {
133
- clas,
134
- fn,
135
- });
136
- }
137
- }
138
-
139
- /**
140
- * 控制器的缓存
141
- * @param cacheyFn
142
- * @param options
143
- * @returns
144
- */
145
- export function ControllerCache(cacheyFn: (...params: any[]) => any, options: {
146
- ttl: number | { max: number, min: number },
147
- enable?: boolean, // true 表示立即启用,默认是true
148
- } = { ttl: 20, enable: true }): MethodDecorator {
149
- return (target: any,
150
- methodName: any,
151
- propertyDescriptor: PropertyDescriptor) => {
152
- if (!target.$_ControllerCache) {
153
- target.$_ControllerCache = new Map<string, any>();
154
- }
155
- target.$_ControllerCache.set(methodName, {
156
- cacheyFn,
157
- options,
158
- });
159
- }
160
-
161
- }
162
-
163
-
164
- export enum IParamTypeEnum {
165
- Body = "Body",
166
- Query = "Query",
167
- Params = "Params",
168
- Headers = "Headers",
169
- State = "State",
170
- }
171
-
172
- /**
173
- * body 参数注解
174
- * @param validate
175
- * @returns
176
- */
177
- export function Body(validate?: any) {
178
-
179
- return (target: any, methodName: string, index: number) => {
180
-
181
- if (!target.$_MethdosParamInfo) {
182
- target.$_MethdosParamInfo = new Map<string, { type: IParamTypeEnum, validate: any }[]>();
183
- }
184
- let paramsInfo = target.$_MethdosParamInfo.get(methodName);
185
- paramsInfo = paramsInfo ?? [];
186
- paramsInfo[index] = {
187
- type: IParamTypeEnum.Body,
188
- validate,
189
- }
190
- target.$_MethdosParamInfo.set(methodName, paramsInfo);
191
-
192
- }
193
-
194
- }
195
-
196
- /**
197
- * query 参数
198
- * @param validate
199
- * @returns
200
- */
201
- export function Query(validate?: any) {
202
-
203
- return (target: any, methodName: string, index: number) => {
204
-
205
- if (!target.$_MethdosParamInfo) {
206
- target.$_MethdosParamInfo = new Map<string, { type: IParamTypeEnum, validate: any }[]>();
207
- // console.log("query MethodsParamInfo set ",index)
208
- }
209
- let paramsInfo = target.$_MethdosParamInfo.get(methodName);
210
- paramsInfo = paramsInfo ?? [];
211
- paramsInfo[index] = {
212
- type: IParamTypeEnum.Query,
213
- validate,
214
- }
215
- target.$_MethdosParamInfo.set(methodName, paramsInfo)
216
- }
217
-
218
- }
219
-
220
- /**
221
- * @param validate
222
- * @returns
223
- */
224
- export function Params(validate?: any) {
225
-
226
- return (target: any, methodName: string, index: number) => {
227
-
228
- if (!target.$_MethdosParamInfo) {
229
- target.$_MethdosParamInfo = new Map<string, { type: IParamTypeEnum, validate: any }[]>();
230
- // console.log("Params MethodsParamInfo set ",index)
231
- }
232
- let paramsInfo = target.$_MethdosParamInfo.get(methodName);
233
- paramsInfo = paramsInfo ?? [];
234
- paramsInfo[index] = {
235
- type: IParamTypeEnum.Params,
236
- validate,
237
- }
238
- target.$_MethdosParamInfo.set(methodName, paramsInfo)
239
- }
240
-
241
- }
242
-
243
- /**
244
- * @param validate
245
- * @returns
246
- */
247
- export function Headers(validate?: any) {
248
-
249
- return (target: any, methodName: string, index: number) => {
250
-
251
- if (!target.$_MethdosParamInfo) {
252
- target.$_MethdosParamInfo = new Map<string, { type: IParamTypeEnum, validate: any }[]>();
253
- // console.log("Params MethodsParamInfo set ",index)
254
- }
255
- let paramsInfo = target.$_MethdosParamInfo.get(methodName);
256
- paramsInfo = paramsInfo ?? [];
257
- paramsInfo[index] = {
258
- type: IParamTypeEnum.Headers,
259
- validate,
260
- }
261
- target.$_MethdosParamInfo.set(methodName, paramsInfo)
262
- }
263
-
264
- }
265
-
266
- /**
267
- * 读取ctx.state上的用户信息
268
- * @param validate
269
- * @returns
270
- */
271
- export function State(validate?: any) {
272
-
273
- return (target: any, methodName: string, index: number) => {
274
-
275
- if (!target.$_MethdosParamInfo) {
276
- target.$_MethdosParamInfo = new Map<string, { type: IParamTypeEnum, validate: any }[]>();
277
- // console.log("Params MethodsParamInfo set ",index)
278
- }
279
- let paramsInfo = target.$_MethdosParamInfo.get(methodName);
280
- paramsInfo = paramsInfo ?? [];
281
- paramsInfo[index] = {
282
- type: IParamTypeEnum.State,
283
- validate,
284
- }
285
- target.$_MethdosParamInfo.set(methodName, paramsInfo)
286
- }
287
-
288
- }
289
-
290
-
291
-
292
-
293
- /**
294
- * 此注解实现 class-validator的 数据预处理,可以直接传一个自定义的处理函数即可
295
- * @param func
296
- */
297
- export function Transform(func: (data: any) => any) {
298
- return (target: any, propertyKey: string) => {
299
-
300
- if (!target.$_Transform) {
301
- target.$_Transform = new Map();
302
- }
303
- target.$_Transform.set(propertyKey, func);
304
- // Object.defineProperty(target, propertyKey, {
305
- // get: () => target[propertyKey],
306
- // set: (newValue) => {
307
- // target[propertyKey] = newValue;
308
- // },
309
- // });
310
- }
311
- }
@@ -1,100 +0,0 @@
1
- /**
2
- * 注解数据存储接口
3
- */
4
- export interface AnnotationData {
5
- processorName: string;
6
- data: any;
7
- }
8
-
9
- /**
10
- * 注解注册器
11
- * 用于注册注解数据到控制器
12
- */
13
- export class AnnotationRegistry {
14
- /**
15
- * 注册注解数据
16
- */
17
- static register(
18
- target: any,
19
- methodName: string,
20
- processorName: string,
21
- data: any
22
- ): void {
23
- if (!target.$_Annotations) {
24
- target.$_Annotations = new Map<string, Map<string, any>>();
25
- }
26
-
27
- if (!target.$_Annotations.has(methodName)) {
28
- target.$_Annotations.set(methodName, new Map<string, any>());
29
- }
30
-
31
- target.$_Annotations.get(methodName).set(processorName, data);
32
- }
33
-
34
- /**
35
- * 获取注解数据
36
- */
37
- static get(
38
- target: any,
39
- methodName: string,
40
- processorName: string
41
- ): any {
42
- if (!target.$_Annotations) {
43
- return null;
44
- }
45
-
46
- const methodAnnotations = target.$_Annotations.get(methodName);
47
- if (!methodAnnotations) {
48
- return null;
49
- }
50
-
51
- const result = methodAnnotations.get(processorName);
52
- return result;
53
- }
54
-
55
- /**
56
- * 获取方法的所有注解
57
- */
58
- static getAll(target: any, methodName: string): Map<string, any> {
59
- if (!target.$_Annotations) {
60
- return new Map();
61
- }
62
-
63
- return target.$_Annotations.get(methodName) || new Map();
64
- }
65
- }
66
-
67
- /**
68
- * 通用注解装饰器工厂
69
- */
70
- export function createAnnotationDecorator(processorName: string) {
71
- return function(data?: any) {
72
- return function(target: any, methodName: string, descriptor: PropertyDescriptor) {
73
- AnnotationRegistry.register(target, methodName, processorName, data);
74
- return descriptor;
75
- };
76
- };
77
- }
78
-
79
- /**
80
- * 参数注解装饰器工厂
81
- */
82
- export function createParameterDecorator(processorName: string) {
83
- return function(data?: any) {
84
- return function(target: any, methodName: string, index: number) {
85
- AnnotationRegistry.register(target, methodName, processorName, {
86
- ...data,
87
- parameterIndex: index
88
- });
89
- };
90
- };
91
- }
92
-
93
- // 导出一些常用的注解装饰器
94
- export const Logging = createAnnotationDecorator('Logging');
95
- export const Permission = createAnnotationDecorator('Permission');
96
- export const RateLimit = createAnnotationDecorator('RateLimit');
97
-
98
- // 参数注解装饰器
99
- export const LoggedParam = createParameterDecorator('Logging');
100
- export const ValidatedParam = createParameterDecorator('ParameterValidation');
@@ -1,160 +0,0 @@
1
- import { Context } from 'koa';
2
- import { annotationRegistry } from '@src/framework/decorator/processor/AnnotationRegistry';
3
- import { logger } from '@src/framework/utils/logger';
4
-
5
- /**
6
- * 注解处理器接口
7
- * 所有注解处理器都需要实现这个接口
8
- */
9
- export interface AnnotationProcessor {
10
- /**
11
- * 处理器名称
12
- */
13
- readonly name: string;
14
-
15
- /**
16
- * 处理器优先级,数字越小优先级越高
17
- */
18
- readonly priority: number;
19
-
20
- /**
21
- * 处理注解逻辑(前置处理)
22
- * @param ctx Koa上下文
23
- * @param controller 控制器实例
24
- * @param methodName 方法名
25
- * @param annotationData 注解数据
26
- * @param callParams 当前调用参数
27
- * @returns 处理结果,如果返回false则中断后续处理
28
- */
29
- process(
30
- ctx: Context,
31
- controller: any,
32
- methodName: string,
33
- annotationData: any,
34
- callParams: any[]
35
- ): Promise<boolean | any>;
36
-
37
- /**
38
- * 后置处理方法(可选)
39
- * 在控制器方法执行完成后调用
40
- * @param ctx Koa上下文
41
- * @param controller 控制器实例
42
- * @param methodName 方法名
43
- * @param response 控制器方法返回的响应
44
- */
45
- postProcess?(
46
- ctx: Context,
47
- controller: any,
48
- methodName: string,
49
- response: any
50
- ): Promise<void>;
51
-
52
- /**
53
- * 响应验证方法(可选)
54
- * 验证控制器方法返回的响应数据
55
- * @param controller 控制器实例
56
- * @param methodName 方法名
57
- * @param response 控制器方法返回的响应
58
- * @returns 验证错误数组,空数组表示验证通过
59
- */
60
- validateResponse?(
61
- controller: any,
62
- methodName: string,
63
- response: any
64
- ): Promise<string[]>;
65
-
66
- /**
67
- * 日志记录方法(可选)
68
- * 记录控制器方法的执行日志
69
- * @param ctx Koa上下文
70
- * @param controller 控制器实例
71
- * @param methodName 方法名
72
- * @param response 控制器方法返回的响应
73
- */
74
- logResponse?(
75
- ctx: Context,
76
- controller: any,
77
- methodName: string,
78
- response: any
79
- ): Promise<void>;
80
- }
81
-
82
- /**
83
- * 注解处理器执行器
84
- */
85
- export class AnnotationExecutor {
86
- /**
87
- * 执行所有相关的注解处理器
88
- */
89
- static async execute(
90
- ctx: Context,
91
- controller: any,
92
- methodName: string,
93
- callParams: any[]
94
- ): Promise<boolean> {
95
- const processors = annotationRegistry.getAllProcessors();
96
-
97
- for (const processor of processors) {
98
- // 检查控制器是否有该注解的数据
99
- const annotationData = this.getAnnotationData(controller, methodName, processor.name);
100
- if (annotationData !== null) {
101
- try {
102
- const result = await processor.process(
103
- ctx,
104
- controller,
105
- methodName,
106
- annotationData,
107
- callParams
108
- );
109
-
110
- // 如果处理器返回false,中断后续处理
111
- if (result === false) {
112
- return false;
113
- }
114
- } catch (error) {
115
- // 处理器异常不应中断后续处理器;测试用例里该异常属于“预期流程”时不打印堆栈噪音
116
- if (process.env.NODE_ENV !== 'test') {
117
- logger.error(`注解处理器 ${processor.name} 执行失败`, error as Error);
118
- }
119
- // 可以选择是否继续执行其他处理器
120
- // 这里选择继续执行
121
- }
122
- }
123
- }
124
-
125
- return true;
126
- }
127
-
128
- /**
129
- * 获取注解数据
130
- * 支持新的注解系统和旧的注解系统
131
- */
132
- private static getAnnotationData(controller: any, methodName: string, processorName: string): any {
133
- // 首先检查新的注解系统
134
- if (controller.$_Annotations) {
135
- const methodAnnotations = controller.$_Annotations.get(methodName);
136
- if (methodAnnotations) {
137
- const annotationData = methodAnnotations.get(processorName);
138
- if (methodAnnotations.has(processorName)) {
139
- return annotationData;
140
- }
141
- }
142
- }
143
-
144
- // 兼容旧的注解系统
145
- const legacyMappings: { [key: string]: string } = {
146
- 'ParameterValidation': '$_MethdosParamInfo',
147
- 'ResponseValidation': '$_ResponseValidator',
148
- 'Cache': '$_ControllerCache',
149
- 'ResponseCode': '$_ResponseCode',
150
- 'ResponseHeader': '$_ResponseHeader'
151
- };
152
-
153
- const legacyMapName = legacyMappings[processorName];
154
- if (legacyMapName && controller[legacyMapName]) {
155
- return controller[legacyMapName].get(methodName);
156
- }
157
-
158
- return null;
159
- }
160
- }
@@ -1,45 +0,0 @@
1
- /**
2
- * 注解处理器注册配置
3
- * 用于在应用启动时注册所有注解处理器
4
- * 这种方式对 webpack 打包友好
5
- */
6
-
7
- // 框架层注解处理器
8
- import {
9
- LoggingProcessor,
10
- PermissionProcessor,
11
- RateLimitProcessor
12
- } from './processors/CustomProcessors';
13
-
14
- // 业务层注解处理器
15
- import { PerformanceMonitorProcessor } from '@src/annotations/processors/PerformanceMonitorProcessor';
16
-
17
- /**
18
- * 获取所有框架层注解处理器
19
- */
20
- export function getFrameworkAnnotationProcessors() {
21
- return [
22
- new LoggingProcessor(),
23
- new PermissionProcessor(),
24
- new RateLimitProcessor()
25
- ];
26
- }
27
-
28
- /**
29
- * 获取所有业务层注解处理器
30
- */
31
- export function getBusinessAnnotationProcessors() {
32
- return [
33
- new PerformanceMonitorProcessor()
34
- ];
35
- }
36
-
37
- /**
38
- * 获取所有注解处理器(框架层 + 业务层)
39
- */
40
- export function getAllAnnotationProcessors() {
41
- return [
42
- ...getFrameworkAnnotationProcessors(),
43
- ...getBusinessAnnotationProcessors()
44
- ];
45
- }