Beans
-
Spring Bean Scopes Example
In this example we are going to demonstrate the types of Bean scopes provided by Spring 3.2.3. In Spring a…
Read More » -
Spring Inner Bean Example
This is an example of how to use an inner Bean definition inside a Bean. In Spring 3.2.3, when a…
Read More » -
How to inject value into Bean properties in Spring
With this example we shall show you how to inject values to Spring Beans properties. Spring’s XML-based configuration metadata supports…
Read More » -
Spring 3 Bean Reference Example
With this example we shall show you how to create bean references, using either annotations or xml configuration in Spring…
Read More » -
Spring 3 Dependency Injection via Constructor and Setter
In this tutorial we are going to demonstrate the Spring Framework implementation of the Inversion of Control (IoC) principle, that…
Read More » -
Spring 3 Java Config @Import Example
In this example we shall show you how to use Spring 3.2.3 Java Configuration, and specifically the @Import annotation. Using…
Read More » -
Spring 3 Java Config Example
With this example we are going to demonstrate how to use Spring 3.2.3 Java Configuration. Java Configuration provides a pure-Java…
Read More » -
Spring 3 Hello World Example
This is an example of how to create a simple Hello World Bean in Spring 3.2.3. The Spring Framework provides…
Read More » -
Declare bean in Spring container
With this example we are going to demonstrate how to declare a Bean in the Spring container. A Spring bean…
Read More » -
Use preferences in Spring
Spring provides PreferencesPlaceholderConfigurer that can be used to load preferences. <bean id="preferencePlaceHolder" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"> <property name="userTreePath" value="com.myapp.preference.staticPreferenceLoader" /> </bean> <bean id="myEntity"…
Read More »