Using java.util.Date values in Spring bean definitions

In a Spring bean definition you can set value properties to a bean by using the value attribute in the property element. For example below I set the value of the firstName property of a bean with id spiros of type com.tzavelas.beans.Person to Spiros. <bean id=”spiros” class=”com.tzavellas.beans.Person”> <property name=”firstName” value=”Spiros”/> </bean> In Spring XML, by […]

Spring Framework’s FactoryBean

Alef Arendsen in this post explains the various ways you can create objects using the Spring ‘s ApplicationContext. He also explains in detail the FactoryBean interface and how it can be used to implement factories that can be embedded in the ApplicationContext XML configuration.