Replies: 3 comments 3 replies
-
替代方案有很多问题,最主要的问题是必须使用单例方式,这样就不能在服务中获取上下文,如果需要使用上下文就必须从Controller中传入。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
目的是啥?解循环依赖? |
Beta Was this translation helpful? Give feedback.
1 reply
-
用消息队列行不行呢 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The feature, motivation(功能、动机)
需要一个中心的事件触发器,将Service之间进行解耦。支持同步触发和异步触发。
建议实现方式:
Alternatives(替代方案)
现在可以实现一个类似的单例服务(
EventService
),注入到其他单例服务中。例如:Additional context(其他上下文)
No response
Beta Was this translation helpful? Give feedback.
All reactions