在单个应用程序中有两个版本的Spring Framework? [英] Two versions of Spring Framework in a single app?

查看:102
本文介绍了在单个应用程序中有两个版本的Spring Framework?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Spring v3开发我的应用程序.现在,我包括了另一个模块(使用Maven),该模块又依赖于Spring v4.虽然我的应用程序和此模块可以正常运行,但如果分别启动,则合作会失败.

I am developing my app, using Spring v3. Now I have included another module (using Maven), which, in turn, depends on Spring v4. While my app and this module work perfectly fine, when booted separately, cooperation just fails.

是否可以将我的应用程序与此模块组合在一起,从而将两个不同版本的Spring捆绑到结果应用程序中?

Is it possible to combine my app with this module somehow, resulting in two different version of Spring bundled into resulting app?

推荐答案

OSGi是隔离您classloader并允许在一个应用程序中使用同一库的不同版本的一种选择.您可以在

OSGi is one alternative to isolate you classloader and allow use different versions of the same library in one application. You can start learning it on this article.

这篇关于在单个应用程序中有两个版本的Spring Framework?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆