Given:
application.yml --> content
kafka:
topicA: topic-a
topicB: topic-b
public enum KafkaTopicBeanMapping {
TOPICA(@Value("${kafka.topicA}", "ratelimiterABean"));
TOPICB(@Value("${kafka.topicB}", "ratelimiterBBean"));
private final String topicName;
private final String ratelimiterBeanName;
}
But in the above case, I am getting error that @Value("${kafka.topicA}")
cannot be used here.
I don't want to put ratelimiterBeanName as part of application.yml.
Is there a way to achieve this?