Learn Spring with Shamik

Spring Tutorial


After getting so many requests from my viewers and Students I am planning to Write Tutorials on Spring only for you.



And the good new is that I have published my Spring Tutorials with A4Academis which is an Academic site published quality Tutorials on various topics like C, C++, Java, Angular JS.



To read my Spring Tutorials please click the link below



About the Tutorials:

There are many Spring tutorials you can find on the web,  why you should read this tutorial?

When I am planning to write a Tutorials for Spring, I researched and found that most of the tutorials just covered the topics with just a few lines with basic examples and provide important Spring classes names in Tabular format, With not much details. Examples are unrealistic which is not

So , I thought it would be great if we write tutorial which try to teach you the core Spring with proper justification and example not only that I also try to point out the concepts which you need to know in very details as those are frequently used in IT world, SO after reading this tutorial you have a fair bit of idea and start using Spring in your Project !!!!


In the case of any clarification/queries drop a note on A4Academics or my personal blog.



Still,  If you want to learn more about Spring, Advance Spring I offer Tuition please contact me on
Shamik Mitra
9830471739(M)
mitrashamik@gmail.com



Happy reading!!!!!












Spring framework download and integration with eclipse step by step.

In this tutorial we will learn how we can download spring framework jars for eclipse and integrate the downloaded spring framework with eclipse . Then we create a basic Spring example to check our setup is successful or not.

Here are the steps to configure Spring core with eclipse IDE

1. Install JDK and eclipse
2. create a java project in eclipse called SpringTest
3. create a folder  lib under SpringTest\lib
4. Download commonLoggin1.2.jar from here http://commons.apache.org/proper/commons-logging/download_logging.cgi

5. extract it and put jars into lib folder earlier created.
6. Download spring from here
http://repo.spring.io/release/org/springframework/spring/4.1.6.RELEASE/
7. extract it and put all jars into the lib folder .
8. Right click on SpringTest ->properties->java build path
9. click on add external   jar and add all jars under lib folder
10.  Create a  folder called configFiles under SpringTest/ src folder.
11. create beans.xml file in configFiles

Add following lines

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

   <bean id="helloWorld" class="com.example.HelloWorld">
       <property name="greet" value="Hello World! Welcome to Spring"/>
   </bean>

</beans>


12 Create a package com.example under
SpringTest\src

13. create a java file HelloWorld.java under the package
com.example

14. Write following in HelloWorld


package com.example;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class HelloWorld {
   
    private String greet;

    public String getGreet() {
        return greet;
    }

    public void setGreet(String greet) {
        this.greet = greet;
    }
   
   
    public static void main(String[] args) {
       
        ApplicationContext ctx = new ClassPathXmlApplicationContext("configFiles/beans.xml");
       
        HelloWorld bean =(HelloWorld) ctx.getBean("helloWorld");
        System.out.println(bean.getGreet());
       
       
    }
   
   

}
15. Run as java application output will be
Hello World! Welcome to Spring