Search code examples
spring-bootyamlspring-config

Set property value like part of another property in YAML config spring boot


I have YAMl config file with property:

send-executor:
    thread-max-count: 5

And I have another property:

ready-query: SELECT * From ...(another conditions).. where ROWNUM >= 5

Can I set instead 5 in ROWNUM >= 5 my another property thread-max-count?

Somthing like this:

ready-query: SELECT * From ...(another conditions).. where ROWNUM >= {$thread-max-count}

Or I need set placeholder and change it in java code only?


Solution

  • Yes, you can. Ths syntax is ${send-executor.thread-max-count}