Monthly Archives: June 2015

Methods of Bean Configurations for Spring Container


There are three ways to provide the configuration metadata to Spring container. Below are the more details about them. 1. Xml based configuration file <?xml version=”1.0″ encoding=”UTF-8″?> <beans xmlns=”http://www.springframework.org/schema/beans&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd”&gt; <!– A simple bean definition –> <bean id=”…” class=”…”>

Tagged with: , , ,
Posted in Spring

Spring Bean Scopes – Examples


There are 5 spring bean scopes as below: 1. Singleton:  If scope is set to singleton, the Spring IoC container creates exactly one instance of the object defined by that bean definition. This single instance is stored in a cache

Tagged with: , , , , ,
Posted in Spring

How to Inject Null or Blank values to a Spring Bean


To inject an NULL value which is equivalent to bean.setMessage(null): <bean id=”beanId” class=”bean”> <property name=”message”><null/></property> </bean> To inject an empty Stringe which is equivalent to bean.setMessage(“”) <bean id=”beanId” class=”bean”> <property name=”message” value=””></property> </bean>  

Tagged with: ,
Posted in Spring

Different Types of Spring Containers


There are two distinct types of spring containers as mentioned below: 1. BeanFactory Container: This is the simplest container providing basic support for Dependency Injection and defined by the org.springframework.beans.factory.BeanFactory interface. The BeanFactory and related interfaces, such as BeanFactoryAware, InitializingBean, DisposableBean,

Tagged with: , , , ,
Posted in Spring

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 678 other followers

Calendar
June 2015
M T W T F S S
« May   Aug »
1234567
891011121314
15161718192021
22232425262728
2930  
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 284,801 hits
IndiBlogger
malliktalksjava.wordpress.c...
70/100