Files
wwjcloud-nest-v1/wwjcloud-nest/src/app.module.ts
wanwujie c4e588a2fe feat: 完成PHP到NestJS迁移工具和代码生成
-  成功运行迁移工具,生成28个模块的完整NestJS代码
-  生成所有实体、服务、控制器、验证器等组件
-  修复npm依赖冲突,更新package-lock.json
-  添加Docker测试脚本和配置文件
-  完善迁移工具的调试日志和错误处理
- 🔧 包含增量更新工具和质量检查工具
- 📊 迁移统计:28个模块,数千个文件,耗时26.47秒

主要变更:
- wwjcloud-nest/src/core/* - 生成的业务模块代码
- tools/* - 迁移工具和辅助脚本
- wwjcloud-nest/package.json - 依赖更新
- docker/* - 容器化配置和测试脚本
2025-10-20 18:43:52 +08:00

32 lines
1011 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Module, MiddlewareConsumer, NestModule } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { ConfigModule } from '@wwjConfig/config.module';
import { CommonModule } from '@wwjCommon/common.module';
import { VendorModule } from '@wwjVendor/vendor.module';
/**
* 应用根模块
* 基于 NestJS 官方示例实现
* 参考: https://docs.nestjs.cn/fundamentals/module-ref
*
* 模块结构:
* - ConfigModule: 配置中心(静态+动态配置)
* - CommonModule: 基础设施层
* - VendorModule: 第三方服务集成层
*/
@Module({
imports: [ConfigModule, CommonModule, VendorModule],
controllers: [AppController],
providers: [AppService],
})
export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
// 这里可以配置全局中间件
// 例如日志中间件、CORS 中间件等
// consumer
// .apply(LoggerMiddleware)
// .forRoutes('*');
}
}