Answer the question
In order to leave comments, you need to log in
How to read from the key the value of one application.properties value from the key of the second application.properties?
Hello everyone
Let's say we have two files application.properties and token.properties.
Token.properties has a key named "token" and its value is "123".
Click on the spoiler "token.properties"
token=123
token=${/src/main/resources/token.properties:${token}}
token=${/src/main/resources/token.properties:token}
Answer the question
In order to leave comments, you need to log in
hello @mr_zadre
in my opinion if you answer who will read the value from the key of the second application.properties?
and how he gets into the key it will be half the answer (more than half
Thank you all for your help! BorLaze sergey
kuzmin
At first I thought to do without @PropertySource and XML altogether, but then I realized that there are no other normal options for the project - so the combination of this annotation and registering token.properties in Spring did the trick.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question