Spring 4

Environment Setup for Spring Framework 4.0

This tutorial will guide you on how to prepare a development environment to start your work with Spring Framework 4. This tutorial will also teach you how to setup JDK, Tomcat and Eclipse on your machine before you setup Spring Framework 4:

Step 1 – Setup Java Development Kit (JDK):

Download latest java (JDK ) version from oracle’s java site.
Set to the class path for this JDK version in case Window OS.

set PATH=C:jdk1.6.0_23bin;%PATH%
set JAVA_HOME=C:jdk1.6.0_23

Alternatively, on Windows NT/2000/XP, you could also right-click on My Computer, select Properties, then Advanced, then Environment Variables. Then, you would update the PATH value and press the OK button.

On Unix (Solaris, Linux, etc.), if the SDK is installed in /usr/local/jdk1.6.0_23 and you use the C shell, you would put the following into your .cshrc file.

setenv PATH /usr/local/jdk1.6.0_23/bin:$PATH
setenv JAVA_HOME /usr/local/jdk1.6.0_23

Step 2 – Install Apache Common Logging API:

You can download the latest version of Apache Commons Logging API from http://commons.apache.org/logging/.

Step 3 – Setup SpringSource Tool Suite (STS) IDE

To install SpringSource Tool Suite (STS)IDE, download the latest SpringSource Tool binaries from http://www.springsource.org/springsource-tool-suite-download . Once you downloaded the installation, unpack the binary distribution into a convenient location.

After a successful startup, if everything is fine then it should display following result:

Step 4 – Setup Spring Framework 4.0 Libraries

1. Spring 4.0 Maven Dependency

Spring 4.0 RC1 is released and final version is to be released in the month of December 2013. If you want to get the Release Candidate 1, use the following maven dependency to download the files.

<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>4.0.0.RC1</version>
    </dependency>
</dependencies>
<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>http://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

2. Download Spring 4.0 Library Files

If you are looking to download the JAR files required to run the Spring 4.0 examples, please download it from here:

(22-Novmber-2013)Spring 4.0 RC1 Distribution Download.

 

Set your CLASSPATH variable on this directory properly otherwise you will face problem while running your application. If you are using Eclipse then it is not required to set CLASSPATH because all the setting will be done through Eclipse.

 

 

<<Previous <<   || Index ||   >>Next >>

 

Previous
Next
Dinesh Rajput

Dinesh Rajput is the chief editor of a website Dineshonjava, a technical blog dedicated to the Spring and Java technologies. It has a series of articles related to Java technologies. Dinesh has been a Spring enthusiast since 2008 and is a Pivotal Certified Spring Professional, an author of a book Spring 5 Design Pattern, and a blogger. He has more than 10 years of experience with different aspects of Spring and Java design and development. His core expertise lies in the latest version of Spring Framework, Spring Boot, Spring Security, creating REST APIs, Microservice Architecture, Reactive Pattern, Spring AOP, Design Patterns, Struts, Hibernate, Web Services, Spring Batch, Cassandra, MongoDB, and Web Application Design and Architecture. He is currently working as a technology manager at a leading product and web development company. He worked as a developer and tech lead at the Bennett, Coleman & Co. Ltd and was the first developer in his previous company, Paytm. Dinesh is passionate about the latest Java technologies and loves to write technical blogs related to it. He is a very active member of the Java and Spring community on different forums. When it comes to the Spring Framework and Java, Dinesh tops the list!

Share
Published by
Dinesh Rajput

Recent Posts

Strategy Design Patterns using Lambda

Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…

2 years ago

Decorator Pattern using Lambda

Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…

2 years ago

Delegating pattern using lambda

Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…

2 years ago

Spring Vs Django- Know The Difference Between The Two

Technology has emerged a lot in the last decade, and now we have artificial intelligence;…

2 years ago

TOP 20 MongoDB INTERVIEW QUESTIONS 2022

Managing a database is becoming increasingly complex now due to the vast amount of data…

2 years ago

Scheduler @Scheduled Annotation Spring Boot

Overview In this article, we will explore Spring Scheduler how we could use it by…

2 years ago