title: Inject value into a static field
body: <p>Here is my class:</p>
  <pre><code> public class DeduplicationErrorMetric extends AbstractErrorMetric {
      
          public static final String DEDUPLICATIONS_METRIC = &quot;deduplications&quot;;
          public static final String KAFKA_MESSAGES_METRIC = &quot;kafka.messages&quot;;
      
          private static String DEDUPLICATION_TOPIC_NAME;
      
          private static final List&lt;Tag&gt; DEDUPLICATION_ERROR_TAGS = List.of(Tag.of(&quot;type&quot;, &quot;failed&quot;));
          private static final List&lt;Tag&gt; KAFKA_ERROR_TAGS = List.of(Tag.of(&quot;topic&quot;, DEDUPLICATION_TOPIC_NAME),
                  Tag.of(&quot;action&quot;, &quot;send&quot;), Tag.of(&quot;result&quot;, &quot;failure&quot;));
      
          public DeduplicationErrorMetric() {
              super(Map.of(
                      DEDUPLICATIONS_METRIC, DEDUPLICATION_ERROR_TAGS,
                      KAFKA_MESSAGES_METRIC, KAFKA_ERROR_TAGS
              ));
          }
      
          @Override
          public void incrementMetric(String key) {
              errorCounters.get(key).increment();
          }
      }
  </code></pre>
  <p>I have <code>@Value(&quot;${kafka.topic.deduplication}&quot;)</code> in my application.yml, and I need to insert the value into <code>DEDUPLICATION_TOPIC_NAME</code> before the bean will be created. How can I do it?</p>