开发者

Which JAR files to add in order to get going in Spring Framework 3.0.5?

The tutorials said I needed to import the Spring.jar and commons-logging.jar files in order to get going. They were using Spring 2.5.6.

开发者_开发百科

The 3.0.5 version I'm using doesn't contain the spring.jar file. What is it referred to now instead?


Much will depends on what parts of Spring you actually need. Spring contains a lot of modules in it and they are not bundled together anymore. This Maven repository lists all released spring artifacts. Look for ones that start with spring- and navigate inside to see if they are released in 3.0.5. If they don't - you don't need them. And files named pom.xml inside those directories may give you an idea on what external libraries you will need.


The Spring JAR files are in the dist directory of the download. Since you're working through tutorials I wouldn't get wrapped up in the exact required JAR files; just put them all in your classpath. It's not like you're going from tutorials straight into production.

As of Spring 2.5 a lot of files were split out into their own JAR files (such as spring-web.jar and spring-webmvc.jar). I don't know that there's a mapping somewhere of old -> new JAR files so if you really want to get the exact JAR files needed with no extras you can download an old copy of Spring and look in the JAR file yourself, then find the new JAR files with those classes.

Incidentally, Spring 3.0.5 doesn't come with the required dependencies. Spring 3.0.2 was the last one to package those up... Look for the download titled "spring-framework-3.0.2.RELEASE-dependencies.zip". I'm sure someone is going to comment, "use Maven!" but not everyone uses Maven or Ivy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜