spring mbean 和 jconsole 接收到的 mbean 是否不同?

发布于 2024-12-27 13:49:44 字数 168 浏览 3 评论 0原文

我有使用 Spring 创建的应用程序,并可以通过 jmx 访问来设置一些参数。问题是,当我通过 jconsole 访问时 - 一切正常,当从我的图形界面访问时 - 不起作用。在调试器中,我检查了是否使用相同的参数调用了相同的方法。 Spring 是否有可能提供我从 jconsole 收到的不同 bean 实例? 谢谢。

I have application created with Spring and has access through jmx to set some parameters. The problem that when I access by jconsole - all works, when access from my graphic interface - doesn't work. In debugger I checked that invoked the same method with the same parameters. Does it possible that Spring privides different instance of bean that I receive from jconsole?
Thanks.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

∞梦里开花 2025-01-03 13:49:44

实例是相同的(除非您的 bean 是原型范围的)

您可以通过将对象的 toString() 打印到控制台并比较 @ 之后的值来验证这一点。

The instance is the same (unless your bean is prototype-scoped)

You can verify that by printing the object's toString() to the console and compare the values after @.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文