In the spirit of beta I’m upgrading spincloud.com to Spring 3.0. I’m using version 2.5.6 currently but it’s missing REST support and I had to use Carbonfive’s REST library which worked like a charm. Now it’s time to get back under Spring’s fold and use their built-in REST support. Spring 3 opens the door to a lot of new features so I’m eager to try it.
I’m using Maven2 to get the jars and Ant to build the project. To fetch Spring 3.0 binaries, you have to add the following repository if you don’t have it:
<repository> <id>SpringSource Enterprise Bundle Repositorys</id> <url>http://repository.springsource.com/maven/bundles/milestone</url> </repository>
and the spring packages that you need since the packaging has changed from 2.5.x. Instead of a single spring.jar file, now there is one per feature so you have to sort out what jars to include in the project. I ended up with the following:
<properties> <spring.version>3.0.0.M2</spring.version> </properties> <dependencies> ... <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.transaction</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.orm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.web.servlet</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.expression</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.test</artifactId> <version>${spring.version}</version> </dependency> </dependencies>
Once the jars are brought, I’ve replaced my old jarfiles with the all-new M2s then fired the build target.
The first issue I found was with the asm version.
Continue reading “Upgrading to Spring 3.0”