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.
相关问题
- java.lang.IllegalArgumentException: Cannot set to
- Spring Data MongoDB - lazy access to some fields
- Declaring an explict object dependency in Spring
- Decoding body parameters with Spring
- Spring Integration - Inbound file endpoint. How to
相关文章
- java JDK动态代理和cglib动态代理最后获取的代理对象都为null的问题
- org.xml.sax.SAXParseException; lineNumber: 7; colu
- SpringMVC如何把File封装到Map中?
- Using JAX-WS 2.2.5 client with JDK/JRE 1.5
- Spring: controller inheritance using @Controller a
- How to load @Configuration classes from separate J
- Java spring framework - how to set content type?
- Java/Spring MVC: provide request context to child
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.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.