Spring IoC Constructor Value Injection
Spring IoC Constructor Value Injection is a method
of constructor injection in which the value of the attributes of a bean
are set using constructor of the class. That means the constructor of
the bean must be defined to accept attributes values and set the values
to bean properties.
We will see the method of using Spring IoC Constructor Value Injection to set dependencies in Person bean.
Person Bean Code (Person.java)
package com.naveen.beans;
public...
Tuesday, 18 December 2012
Sunday, 16 December 2012
Spring IoC setter value injection
We will learn the process of setting property values of a bean using Spring IoC Setter Value Injection. For Spring IoC Setter Value Injection to work the bean class must contain setter of the property present.
In the following example we will consider a Person class which has
two properties to construct the name of the person. We will set the
property values in Spring IoC Bean Configuration file and the print the
name of the person.
Person Bean class...
Thursday, 13 December 2012
Using Initialization method to initialize a Spring IoC Bean
With the previous tutorial, you know the process of registering a bean
class with Spring IoC container using xml configuration files. In this
tutorial we will see how to define an initialization method of bean to
Spring IoC, so that Spring IoC container invokes the method after
creating instance of the bean to perform some initialization work.
Tools Used:
Spring IoC Framework 3.0.3
In our example, we will define an initialization...
Configuring Spring Bean and creating Spring Bean instance
This quick start will make you go through the implementations of Spring IoC
example and illustrate how to configure your Spring Bean in Spring
Configuration file and how to get instance of the bean using Spring IoC
container. The example will take a example of Cat class (Cat.java) that
will implement Speaks interface (Speaks.java) .
Speaks Interface (Speaks.java)
package com.naveen.beans;
public interface Speaks {
...
Wednesday, 12 December 2012

What is Spring IoC?
Before going through the Spring IoC tutorial, we must know what IoC is and why we use it in real life project development.
IoC or Inversion of Control, is also known as Dependency Injection, is
used to create loosely coupled software components. Here, loosely
coupled means less dependent software components. Let us illustrate it
with an example:
There is a Report class used to generate reports...

Ajax with Spring MVC 3 Using Annotations and JQuery
Its always been fun for me to work with Ajax! Is not it ? I will make it easy for you to use Ajax with Spring MVC 3 and JQuery.
This post will illustrate you how to use Ajax in real life practices of
industrial coding. As usual, we will take an practical example of Ajax
in Spring MVC 3 framework and will implement it and I will make the
implementation easy by...
URL Permission Based User Interface Creation in Spring Security
In the previous tutorial, we learned how to customize jsp out put based on the role of the logged in user with the help of the Spring Security JSP Taglibs.
Now, we will learn the way to customize the jsp page on the basis of a
secure url. That means if the logged in user will have permission to
visit the url specified in the taglib attribute, the particular jsp
segment will be rendered otherwise, the segment will not shown to...
Role Based User Interface Creation Using Spring JSP Taglibs
Spring Security provides jsp taglibs for customizing User Interface
according the authenticated user’s role. We can make it possible to show
some ui portion to user with role admin and not to others.
This tutorial is based on the previous Spring Security Tutorials. You should first read Getting Started with Spring Security tutorial and then read this tutorial for better understanding.
Tools Used:
Spring MVC 3.0.3
Spring JDBC...
Subscribe to:
Posts (Atom)