c# - 从 AbpZeroModule 覆盖 NotificationStore
问题描述
我需要重写 NotificationStore 的一些方法,所以我创建了自己的类来扩展 Abp.Notifications.NotificationStore
我应该在哪里告诉框架使用我的实现而不是 Abp 模块零通知存储。
我试图在核心模块中调用 iocManager.register,但 NotificationStore 仍在调用。
解决方案
阅读有关替换内置服务的文档。
// using Abp.Configuration.Startup;
Configuration.ReplaceService<INotificationStore, MyNotificationStore>(DependencyLifeStyle.Transient);
推荐阅读
- java - 使用占位符 jpa 命名查询将列名作为参数传递,返回不正确的数据
- winforms - 在 Winforms ReportViewer 中为当前页码添加偏移量
- vue.js - 更改 Axios 默认参数在 Vuex 操作事件上未更改
- node.js - 如何在 Heroku 上设置环境变量?
- html - 突出显示垫行单元格的全宽
- javascript - 在 react js 中使用 ant design 上传图片
- python - 如何计算Django中一个对象的多个字段的值?
- lightningchart - LineSeries-onMouseClick的麻烦
- scala - 计算给定列集的不同列值
- wordpress - Worpress 上的 icomoon.ttf 显示 404 和较长的响应时间减慢了我的网站