如何在其他项目中获取应用程序context
我有两个春季项目,我想在其中一个项目中获取另一个项目的应用程序对象。我应该怎么做?
我想使用ASM来增强SpringApplication类,但是JVM运行时不支持添加字段和方法(DCEVM除外,但我使用的是Hotspot),所以我考虑过修改JAR文件,但我无法修改它。
如果我使用JMX做到这一点,这是一个很好的解决方案吗? 我尝试使用JMX,但他无法公开ApplicationContext对象。
我试图使用JNI方法来实现它。
I have two spring projects, and I want to get the applicationContext object of the other project in one of the projects. How should I do it?
I want to use asm to enhance the SpringApplication class, but the jvm runtime doesn't support adding fields and methods (except dcevm, but I'm using hotspot), so I thought about modifying the jar file, but I can't modify it.
Would it be a good solution if I use jmx to do it?
I tried to use jmx but he can't expose ApplicationContext object.
I tried to use jni method to achieve it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论