Step by step guide for Spring configuration

    0 Votes

In this article you will learn each and every step required to configure Spring core with eclipse IDE with the help of screenshots.

  • First, install JDK (greater or equal JDK 1.6) from here on your Operating System
  • Install eclipse from https://eclipse.org/downloads/ based on your operating system
  • If OS is windows open Environment variables

 environment variables

  • Click on Environment variables tab and add JAVA_HOME(under System variables) and provide installation directory of Java in value field. Our installed directory is "C:\Program Files(x86)\java\jdk1.8.0_73"
 environment variables setup
  • Double click on Path variable under System variable section
 environment path variables
  • Add "%JAVA_HOME%\bin" after variable value.(Don’t delete anything just append) click ok.
  • Open command prompt and hit following command and type "java -version" in the command prompt, If it is showing java version that means java has been successfully set up and set in classpath.
java-version

  • If OS is Linux, Open .bashrc file under home directory and add the following commands.
export JAVA_HOME = /usr/local/jdk1.8.0_73
export PATH=$PATH:$JAVA_HOME/bin

 

  • Open a terminal and type “java -version” If it is showing java version, that means java has been successfully set up and set in classpath.
  • Go to eclipse installation directory and click on eclipse.exe.
  • Eclipse asks for a workspace, please choose a workspace let say “C:\\javaProj” or in Linux “/home/<user>/javaproj”
  • Create a java project in eclipse called "SpringAssignment"

 spring project

  • create a folder lib under SpringAssignment \lib
  • Download commonLoggin1.2.jar from here http://commons.apache.org/proper/commons-logging/download_logging.cgi
  • extract it and put jars into lib folder we had created earlier(SpringAssignment \lib).
  • Download spring from here
  • Extract it and put all jars into the lib SpringAssignment\lib folder.

 spring project lib folder

  • Right click on SpringAssignment ->properties->java build path
  • click on add external jar and add all jars under lib folder

spring project external lib

Well done setup is complete, now we will test it with a basic application in next chapter.

Planning to do an MBA?
A quick all-in-one MBA entry manual for MBA Aspirants. Book covers
  • Possible MBA Tests & Exam Preparation
  • Tips to choose right MBA Program
  • Essay, Resume & Letter of Recommendation
  • MBA Interview Preparation
  • MBA Financial Planning
Price - 6.99$
 

Popular Videos

How to speak to people

How to speak so that people want to listen.

Got a tip or Question?
Let us know

Related Articles

Spring Framework - Overview
Spring Architecture
Building First Spring application
Spring Bean XML File
Spring Container
Spring Bean - Learn with an Example
Spring Bean Scope
Spring Bean Life Cycle
Spring Bean Post Processor
Spring Inner Bean
Spring Autowiring
Spring Autowiring Types
Spring Qualifier with Autowiring
Spring Collection Injection
Spring Inheritance
Spring Event Handling
Dependency Injection
Spring AOP
Spring AOP Example