Answer the question
In order to leave comments, you need to log in
How to get properties at runtime in spring?
there is a list of properties in the file property.name.0, property.name.1 ... property.name.N
how to get them?
Tried like this:
private final ClassPathXmlApplicationContext ctx;
...
String prop = ctx.getBeanFactory().resolveEmbeddedValue("${property.name." + i + "}");
ERROR java.lang.IllegalArgumentException: Could not resolve placeholder 'property.name.0' in value ${property.name.0}"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question