cool-team-official / cool-admin-midway

🔥 cool-admin(midway版)一个很酷的后台权限管理框架,Ai编码、流程编排、模块化、插件化、CRUD极速开发,永久开源免费,基于midway.js 3.x、typescript、typeorm、mysql、jwt、vue3、vite、element-ui等构建
https://cool-js.com
MIT License
2.65k stars 588 forks source link

最新7.X 配置多数据源,报错 #169

Closed Ganshixiong closed 8 months ago

Ganshixiong commented 8 months ago

src/config/config.local.ts 6a5b79439339f644a635b6ecf1345b6 错误信息 1710829155817

把eps关闭或者只使用一个数据源的时候不会出现路由重复定义错误

baseCommController类代码如下:(下载下来的示例代码,为进行更改) import { Provide, Inject, Get, Post, Body, ALL } from '@midwayjs/decorator'; import { CoolController, BaseController } from '@cool-midway/core'; import { BaseSysUserEntity } from '../../entity/sys/user'; import { BaseSysLoginService } from '../../service/sys/login'; import { BaseSysPermsService } from '../../service/sys/perms'; import { BaseSysUserService } from '../../service/sys/user'; import { Context } from '@midwayjs/koa'; import { PluginService } from '../../../plugin/service/info';

/**

Ganshixiong commented 8 months ago

@cool-midway\core\rest\eps.js 1710900873560 多配置时,当前方法调用与midway框架本身初始化存在异步问题 1710901089471 eps.js里面调用getFlattenRouterTable方法还为设置到isReady属性时,midway框架本身也已经执行到该步骤了,导致2次analyze

cool-team-official commented 8 months ago

已修复更新 "@cool-midway/core": "^7.1.10"