mirror of
https://github.com/certd/certd.git
synced 2026-05-15 20:47:31 +08:00
chore:
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Autoload, Init, Inject, Scope, ScopeEnum } from "@midwayjs/core";
|
||||
import { logger } from "@certd/basic";
|
||||
import { PluginService } from "../plugin/service/plugin-service.js";
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoBLoadPlugins {
|
||||
@Inject()
|
||||
pluginService: PluginService;
|
||||
|
||||
|
||||
@Init()
|
||||
async init() {
|
||||
logger.info('加载插件开始');
|
||||
await this.pluginService.registerFromDb()
|
||||
logger.info('加载插件完成');
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user