nestjs中,Service无法找到Repository依赖.md
nestjs中,Service无法找到Repository依赖
启因
如下代码:
|
|
运行时会报错: Nest can't resolve dependencies of the SiteRbacService
,日志显示就是: @InjectRepository(RbacEntity) public readonly repository: Repository<RbacEntity>
这个没有引入
如下代码:
|
|
运行时会报错: Nest can't resolve dependencies of the SiteRbacService
,日志显示就是: @InjectRepository(RbacEntity) public readonly repository: Repository<RbacEntity>
这个没有引入
先找到要挂载的硬盘的id
:
|
|
结果类似:
|
|
比如要挂载/dev/disk/by-id/wwn-0x5000000000000
,VM
编号为: 103
,执行如下操作:
刚装好gluster
,在上面存放了linux container
的rootfs
,这样linux container
就可以在两台pve
的群集中做高可用了.
需要保存两个pve节点的版本一样
两个proxmox ve
节点,实现高可用vm
,lxc
自动迁移
最近老是出现这个错误: JsonWebTokenError: secret or public key must be provided
,
我已经在环境变量中增加imports: [JwtService]
,
也在底层库shared.module.ts
里面增加了:
最近写nestjs
项目,他的UserGuard
很方便,相当于在route
处理request
时,可以经由AuthGuard
来处理验证代码.
但是,我在写的过程中,出了一个问题,花了很长时间来解决,比如如下 StaffAuthGuard.ts
代码: