我们想在 Glassfish 4.1 中集成最新的 Jersey 版本。
Glassfish 提供 Jersey 2.21.0 实现,因此我们将 Jersey 2.22.2 添加到 WEB-INF/lib。它可以与新版本一起使用。
但这是正确的解决方案吗? Glassfish 是否总是将库放在 WEB-INF 中,然后放在类路径中?
最佳答案
If it is not an option to modify glassfish installation, you still may force glassfish to consider the libs in your web app before the global ones. You just need to provide file glassfish-web.xml in your application along standard web.xml in WEB-INF. Set delegate="false" in the class-loader element of the glassfish-web.xml file. For more documentation, see Glassfish Deployment Guide, section C - Elements of the GlassFish Server Deployment Descriptors.
感谢 OndrejM!
关于Glassfish 4.1 - 最新 Jersey 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35769351/