Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Going from Spring 3 to Spring 2 what to keep in mind?

I've been told I have to develop a Spring 2 application (no idea myself why they don't want a Spring 3 application since they use Java 5). The problem is that all my experience is with Spring 3.

I know there's a reference manual but I find that those are a lot easier when moving forward and not backward.

So I was wondering what the major differences are between these 2. I'm expecting to have to do a lot more configuration work in xmls.

In Spring 3 I mostly use the @RequestMapping, @ModelMapping, path binding in the jsp, automatic type conversion from String to date, hibernate-validator, ...

Any pointers would be appreciated.

like image 614
James Avatar asked Dec 05 '25 19:12

James


1 Answers

Firstly, if you haven't been given a reason for using Spring 2, can't you find out what that reason is? They may not be aware of Spring 3's existence. It can't hurt to ask, especially if you tell them you're more proficient in Spring 3.

Failing that, then most of the features you've mentioned work OK in Spring 2.5.6 (including annotation-based MVC, form tags), with the notable exception of the Hibernate Validator integration. You'll have to use the other validation techniques mentioned in the ref manual instead.

Most of the Spring 3 new stuff was really under the covers, with much of the infrastructure rewritten.

like image 185
skaffman Avatar answered Dec 08 '25 11:12

skaffman