Spring Property Ref标签的动态值

时间:2015-08-28 20:01:31

标签: spring spring-mvc spring-batch application.xml

任何方式都可以将动态值传递给java中的以下代码中的ref tag属性吗?

<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>

`

1 个答案:

答案 0 :(得分:1)

You can load them from a file of properties

如果要在运行时更改该值,则必须build and launch at runtime.