错误:
The current type is an interface and cannot be constructed. Are you missing a type mapping?
原因:
在使用DI(dependency injection)依赖注入的时候,忘记注册了。
解决:
注册一下接口和方法
container.RegisterType
The current type is an interface and cannot be constructed. Are you missing a type mapping?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
【自用】关于微信小程序的合法域名列表,
微信小程序真機調試時出現了,Error: request:fail url not in domain list:api.xxx.com 需要把網址添加到合法域名中,見圖 --- 自用 不解釋
golang gorm中find和first区别
Find 存在值 .Error返回 nil Find 不存在值 .Error返回 nil Fisrst 存在值 .Error返回 niu Fisrst 不存在值 .Error返
24小時熱門文章