Spring 属性 Ref 标签的动态值
Dynamic value to Spring Property Ref tag
有什么方法可以将动态值传递给下面代码中的 ref 标签属性 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>
`
You can load them from a file of properties
如果要在运行时更改值,您必须 build and launch at runtime.
有什么方法可以将动态值传递给下面代码中的 ref 标签属性 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>
`
You can load them from a file of properties
如果要在运行时更改值,您必须 build and launch at runtime.