Spring AOP 简介与 JMX 的使用

发布于 2025-01-06 11:26:12 字数 268 浏览 3 评论 0原文

我正在使用 Spring JMX 支持来公开 MBean。此外,为了分离出 JMX 代码库,我尝试使用 AOP 的简介支持,这将允许我从业务 POJO 中取出 JMX 相关方法,并在 JMX 相关方面单独模块化它们。 虽然 JMX 支持和 AOP 的介绍对我来说很有效,但是当同时使用时,Aspect 中引入的 JMX 相关方法不会在 MBean 中公开。

这可以通过 Spring 实现吗?或者是否有其他更干净的方法来启用我的 bean JMX,并且不会将与 JMX 相关的问题与我的核心代码混合在一起?

I am using Spring JMX support in order to expose the MBeans. Furthermore, to separate out the JMX code base, I am trying to use AOP's Introductions support which will allow me to take out the JMX related methods from the business POJOs and modularize them separately in JMX related Aspects.
While JMX support and AOP's introductions are working for me but when used in tandem, the JMX related methods introduced in the Aspect aren't being exposed in the MBeans.

Is this achievable through Spring? or is there any other cleaner way to have my beans JMX enabled and also not mingle the JMX-related concerns with my core code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文