• spring,  springExample

    Spring first HelloWorld example

    Here I will try to walk through the Spring3.0 first example, which will help you in understanding the spring workflow. and classes and xml required to complete one request process, here we will work on sample java application and not a web application. Here we are creating following components to run Spring java application, but before starting please read through the configuration required for Spring3, this will help you setup spring in eclipse.Lets create a simple class with sayHello method in it, and put some instructions so that you can see something happening in console here I have put SOP which will print a line Hello from Spring 3.0.Spring3HelloWorld.java package…

    Comments Off on Spring first HelloWorld example
  • spring,  springExample

    Spring first time Configuration and set up IDE

    We have divided Spring Configuration in below steps so please be sure these are available before jumping into Spring Example or Spring Application to work: JDK 5+ Eclipse Setup. Spring 3.0 Download common-logging download Create Project and add lib in Eclipse JDK 5+, Spring 3.0 is based upon JDK 5, so it will require to have JDK 5 or after version to build an Spring Application. if you don’t have JDK, please download it from here.Check Java Version by java -version Eclipse Setup, Download the eclipse at http://www.eclipse.org/downloads/Common-logging download, Spring use common logging for making logs so please download it from http://commons.apache.org/downloads/download_logging.cgi, else you will get an error like below:Exception in thread “main”…

    Comments Off on Spring first time Configuration and set up IDE
  • spring,  Spring Interview Questions,  springExample

    What is Inversion Of Control(IOC)?

    Inversion of control or dependency injection (which is a specific type of IoC) is a term used to resolve objectdependencies by injecting an instantiated object to satisfy dependency as opposed to explicitly requesting anobject. So objects will not be explicitly requested but objects are provided as needed with the help of an Inversion Of Controller container (e.g. Spring etc). This is analogous to the Hollywood principal where the servicing objects say to the requesting client code (i.e. the caller) “don’t call us, we’ll call you”. Hence it is called inversion of control. Many of us are familiar with the software development context where client code collaborates with other dependent objects (or servicing objects) by…

    Comments Off on What is Inversion Of Control(IOC)?