J3 Limited
Introduction To Spring

Set Up a Spring Project

A bare bones Java application that uses Spring is created in this section.

In eclipse. select "File->New->Other", then select "Java Project" and click on next:

Enter the project name SpringConsole and click finish.

Create a new folder called lib in the project.

Copy the required core Spring framework jar files to the lib folder. Note that in addition to the jar files found in the Spring distribution, the Apache Commons Logging jar (commons-logging-1.1.1.jar) is also needed.

The minimal set of jar files for a Spring framework project are:

  • org.springframework.asm-3.1.1.RELEASE.jar
  • org.springframework.beans-3.1.1.RELEASE.jar
  • org.springframework.context-3.1.1.RELEASE.jar
  • org.springframework.core-3.1.1.RELEASE.jar
  • org.springframework.expression-3.1.1.RELEASE.jar
  • commons-logging-1.1.1.jar

The above jar files are added to the project's path, by using the project properties dialog. Selecting "Add Jars..." below, allows the Spring framework jar files to be added to the project's build path.

Next a folder to hold other resource files is created, and added to the project's source path. The resource folder, named "res", is used to hold various project configuration files, such as xml files and property files


The project's tree should now be as shown below:

That's it for a bare bones Spring framework project, in the next section, the application code and configuration files are written.

  Copyright © 2006 J3 Ltd Permission is granted to reproduce material on this page, on the condition that a reference to "WWW.J3Ltd.com" is given as the source of the material.