首页  编辑  

Java/SpringBoot/注解的参数值来自于属性yml properties,类似 @Value

Tags: /Java/   Date Created:
application.properties 中定义 topicName=cat,dog
topics = {"${topicName}"}
@Topic(name="#{'${topicName}'.split(',')}")
public void abc() {
}

@Topic(name = "#'$(a.b.c)'")
public void abc() {
}


kafka动态配置topic_kafka 动态topic_Oo。°ºO的博客-CSDN博客