I am new to spring, Is there any way to initialize spring bean using property file key-value pair;
; if like my config.properties
file contains isSetup = true;
then only initialize, <bean id="a" class="com.Setup"/>
Please refer this post How can I inject a property value into a Spring Bean which was configured using annotations?
This link can also help you : http://springinpractice.com/2008/12/02/new-stuff-in-spring-30/
You can pass the property as below to bean :
<bean id="a" class="com.Setup"/>
<property name="isSetup " value="#{systemProperties.isSetup }"/>
</bean>