New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change to placeholder value in XML is not reevaluated at runtime #25022
Comments
Thanks for raising the issue. Your analysis is correct: placeholder values in XML are evaluated only once. This is by design. Consequently, we are labeling this issue as a |
It's weird that not keep consistency between xml and annotation, is there any workaround to fix this? I'm using spring-batch and configure job in xml, migration is hard and risky, but changing job behavior at runtime is quite desired. |
It's rather the other way round:
Note that |
Thanks for elaboration. I found only UPDATED: I found |
Yes, that would be the recommended approach to dynamically accessing an environment variable with a default, fallback value.
Have you considered using Spring Batch's step scope and/or accessing job parameters via a SpEL expression? Perhaps @mminella can provide further insight here. |
Thanks, my puzzle is resolved by |
But test will pass if using
@Value("${value:10}")
instead ofp:value="${value:10}"
, here is test project ps.zipThe text was updated successfully, but these errors were encountered: