Upgrade from Spring 2.0 to Spring 2.5
15/06/2010 § 2 Comments
I’ve been upgrading recently the webapp I’m working on the moment from Spring 2.0 to Spring 2.5 (in the process to upgrade to 3.0) to enjoy Spring Annotations power.
This task is pretty straightforward and requires to substitute jars from 2.0 version with 2.5 version. It’s enough to download Spring Framework from here.
Big gotcha : spring-webmvc.jar is not part of spring.jar any more so you need to include both the jars to use SpringMVC
Now you can start enjoying annotation!
Start changing your Spring configuration file (dispatcher-servlet.xml or whatever you configure in web.xml) with something like:
<?xml version="1.0" encoding="UTF-8"?;>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:oxm="http://www.springframework.org/schema/oxm"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
// Declare all Beans here
</beans>
Ok, now you’re ready to use @Autowired, @Controller, @RequestMapping and so forth!
Thanks for your comment bet365
Good day I was fortunate to seek your website in baidu
your post is splendid
I get a lot in your topic really thanks very much
btw the theme of you blog is really admirable
where can find it