You are on page 1of 1

Spring ApplicationContext = ClassPathXmlApplicationContext FileSystem ApplicationContext Two others in configuration file .

xml
<bean id="sequenceGenerator" class="com.apress.springrecipes.sequence.SequenceGenerator"> <constructor-arg type="int" index="0" value="100000" /> <constructor-arg type="java.lang.String" index="1" value="A" /> <property name="prefix" value="30" /> </bean>

If no constructor is mentioned then the default constructor is invoked orelse accordingly then if property is defined then it is set.

beans to access each other, you have to specify bean references in the bean configuration file.

You might also like