• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

when two version of spring introduced by maven dependency

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to use spring 3 or 4 using maven dependency, meanwhile I need to use spring module validation dependency since the current code base uses it.  Its highest version of 0.8 has dependency of spring 2.  So this brings two versions of spring : one is spring 3 or 4 and the other one is spring 2 (by spring-module validation).  So in this case, which spring am I actually using ?  How should this be handled ?
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mixing versions is asking for trouble.

Either stick with Spring 2, or migrate your current code base that it uses the new framework properly.
 
David Mutansan
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Mixing versions is asking for trouble.

Either stick with Spring 2, or migrate your current code base that it uses the new framework properly.



But I can't get rid of the spring-module-validation dependency.  Do you mean I should rewrite the validation part in order to not use it any more ?
 
Stephan van Hulst
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's what I mean by migrating, yes.

There's no point in moving your application to a new framework version if you're not willing to rewrite parts of it to use the new framework.

Validation has become part of Spring's core modules, with some luck they didn't make a lot of changes to it and all you have to do is update some import statements.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that Spring is up to version 5 by now. Is there any reason you wouldn't want to go to 5 if you are upgrading?
 
reply
    Bookmark Topic Watch Topic
  • New Topic