java:在一个webapp中使用同一个lib的两个版本 [英] java: use two version of the same lib in one webapp

查看:181
本文介绍了java:在一个webapp中使用同一个lib的两个版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了以下问题:我的webapp中有一个模块需要jaxb 1.x而另一个模块需要jaxb 2.x.第一个模块不适用于新版本的jaxb,反之亦然。我怎样才能在一个项目中使用这两个罐子?
谢谢。

I'm facing the following problem: I have one module in my webapp that needs jaxb 1.x and the other module needs jaxb 2.x. The first module doesn't work with the new version of jaxb, and the opposite. How can I use these two jars in one project? Thanks.

推荐答案

如果您使用的是JAXB参考实现,那么您可以使用 JAXB 1 具有 JAXB 2 运行时的模型,包括 jaxb1-impl.jar

If you are using the JAXB reference implementation, then you can use your JAXB 1 models with the JAXB 2 runtime by including the jaxb1-impl.jar.

  • http://jaxb.java.net/faq/index.html#running1Apps

这篇关于java:在一个webapp中使用同一个lib的两个版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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