I am using Java+Spring+spring XML configuration in my project.
I would like to read one property value from the property file and set java value in spring configuration using input String value.
MyClass.class
private String tableDetails;
private String logpath;
myTest.properties
log_path=C:\test\app
table1_details=table1Name|table1Key|query1
table2_details=table2Name|table2Key|query2
table3_details=table3Name|table3Key|query3
Spring_config.xml
<bean id="myClass" class="com.test.MyClass">
<property name="logpath" ref="${log_path}"/>
<property name="tableName" value="#{systemProperties['checker.table']}"/>
<property name="tabledetails" value="${#{systemProperties['checker.table']}}"/>
suppose checker.table = table1_details then
<!--working-->
<property name="tableDetails" value="${table1_details}"/>
<!--not working-->
<property name="tableDetails" value="${#{systemProperties['checker.table']}}"/>
So the requirement is that I have property name in systemProperties['checker.table'] which I am not able to use in value field to read the property details of table1_details and set the tableDetails in MyClass?