Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有使用 Spring 创建的应用程序,并且可以通过 jmx 访问以设置一些参数。当我通过 jconsole 访问时 - 一切正常,当从我的图形界面访问时 - 的问题不起作用。在调试器中,我检查了是否使用相同的参数调用了相同的方法。Spring 是否有可能提供我从 jconsole 收到的不同 bean 实例?谢谢。
实例是相同的(除非您的 bean 是原型范围的)
toString()您可以通过将对象打印到控制台并比较之后的值来验证这一点@。
toString()
@