Spring-WS 1.5 可以与 Spring 3 一起使用吗?
Spring-ws 1.5.9依赖于Spring 2.5(基于pom)。它可以与 Spring 3 一起使用而不会遇到任何类加载问题吗?我知道某些包在两者之间匹配,我可以不包含那些 Spring 3 jar 吗?我似乎找不到任何官方说法。
Spring-ws 1.5.9 depends on Spring 2.5 (based on the pom). Can it be used with Spring 3 without running into any classloading issues. I know that some of the packages match between the two, can I just not include those Spring 3 jars? I cant seem to find any official word on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除了skaffman的回答之外,以下是如何通过Maven将Spring-WS 1.5.9与Spring 3一起使用:
1)首先排除Spring 3的OXM依赖项。只需从POM中删除以下依赖项即可。
如果您使用的另一个框架对 Spring 3 有传递依赖(例如 Apache Camel 的camel-spring 模块),请使用:
2) 删除 Spring-WS 1.5.9 对 Spring 2.5 的传递依赖.6:
3) 最后确保您在 POM 中包含必要的 Spring 3 模块(上面的列表)作为依赖项。
就是这样,您现在应该能够将 Spring-WS 1.5.9 与 Spring 3.x 一起使用。
In addition to skaffman's answer, here's how to use Spring-WS 1.5.9 with Spring 3 through Maven:
1) First exclude the OXM dependency of Spring 3. Just remove the following dependency from your POM.
If you're using another framework that has a transitive dependency on Spring 3 (like Apache Camel's camel-spring module) use:
2) Remove the transitive dependency that Spring-WS 1.5.9 has on Spring 2.5.6:
3) Finally make sure you include the necessary Spring 3 modules (the list above) as dependencies in your POM.
That's it you should now be able to use Spring-WS 1.5.9 with Spring 3.x.
官方说法是,不,它们不兼容。正如您所说,两者之间存在包冲突 - 特别是 org.springframework.oxm 。这个包是从 Spring-WS 引入到 Spring 3 中的,两者会发生冲突。
Spring-WS 2.0 的工作本应在 Spring 3.0 发布后立即完成,但这并没有发生。在此之前,Spring-WS 仍然与当前版本的 Spring 框架不兼容。
在实践中,我发现如果您省略 Spring 3 发行版中的 org.springframework.oxm JAR,则两者可以很好地协同工作。不过,如果您使用的是 Maven,我不确定这是否适合您。
Officially, no, they're not compatible. Like you said, there are package conflicts between the two -
org.springframework.oxm
in particular. This package was brought into Spring 3 from Spring-WS, and the two will clash.Work was supposed to be completed on Spring-WS 2.0 immediately after Spring 3.0 was released, but this hasn't happened. Until that happens, Spring-WS remains incompatible with the current release of Spring Framework.
In practise, I've found that if you omit the
org.springframework.oxm
JAR from the Spring 3 distro, the two work fine together. If you're using maven, though, I'm not sure if this is an option for you.