Spring boot 将属性值设置为YAML config spring boot中另一个属性的一部分

Spring boot 将属性值设置为YAML config spring boot中另一个属性的一部分,spring-boot,yaml,spring-config,Spring Boot,Yaml,Spring Config,我有属性为的YAMl配置文件: send-executor: thread-max-count: 5 ready-query: SELECT * From ...(another conditions).. where ROWNUM >= 5 我还有另一个财产: send-executor: thread-max-count: 5 ready-query: SELECT * From ...(another conditions).. where ROWNUM >

我有属性为的YAMl配置文件:

send-executor:
    thread-max-count: 5
ready-query: SELECT * From ...(another conditions).. where ROWNUM >= 5
我还有另一个财产:

send-executor:
    thread-max-count: 5
ready-query: SELECT * From ...(another conditions).. where ROWNUM >= 5
我可以在
ROWNUM>=5
我的另一个属性
线程最大计数中设置5

像这样的事情:

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

或者我只需要在java代码中设置占位符并更改它?

是的,您可以。语法是
${send executor.thread max count}

您可以使用@Value(${thread max count}”),然后在查询中使用该变量。