We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我对于Main控制器写了个拦截器,完成用户登录的日志功能,却发现@InjectEntityModel注入的实体为undefined ,如下代码,打印出来的this.m_NW_SYS_LOG_OF_LOGIN 为 undefined
这是为什么呢
The text was updated successfully, but these errors were encountered:
目前改写成以下代码已完成功能,但是还想知道拦截器中注入失败的原因,因为中间件使用 @InjectEntityModel没问题,但是拦截器却不行,中间件不也是单例吗(PS:中间件为路由中间件)?
之前我是使用中间件来完成该功能的,中间件中@InjectEntityModel没问题。
Sorry, something went wrong.
可能和执行时机有关,拦截器类的初始化时机非常靠前,早于 typeorm 的model初始化之前了。
No branches or pull requests
我对于Main控制器写了个拦截器,完成用户登录的日志功能,却发现@InjectEntityModel注入的实体为undefined ,如下代码,打印出来的this.m_NW_SYS_LOG_OF_LOGIN 为 undefined
这是为什么呢
The text was updated successfully, but these errors were encountered: