0

Any way is it possible to pass dynamic value to the ref tag attribute in below code from java?

<bean id="jobLauncherTestUtils" class="org.springframework.batch.test.JobLauncherTestUtils" >
        <property name="job" ref="$(dynamicValue)"/>
        <property name="jobLauncher" ref="jobLauncher"/>
         <property name="jobRepository" ref="jobRepository" />
    </bean>

`

Rohan K
  • 177
  • 1
  • 3
  • 21
  • Maybe you should use [Java-configuration](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/beans.html#beans-java-bean-annotation) instead of XML configuration? – mkczyk Aug 28 '15 at 20:40
  • @mk321 Thanks! I had also thought of that , but its an existing application. Not allowed to go for such big change. Had to do it in xml fashion. – Rohan K Aug 28 '15 at 20:55

1 Answers1

1

You can load them from a file of properties

If the value should be changed at runtime you must build and launch at runtime.

Community
  • 1
  • 1