title: Spring boot instantiate variable from @Value annotation
body: <p>I have codes as below. I have variable values from application.properties file and how to assign it to another variable? In this case to coreApi variable.</p>
  <p>Here is certainly fails because serverKey and clientKey is still null</p>
  <p>And I don't want to initiate coreApi inside class action, I want it on variable init level.</p>
  <p>Is this possible?</p>
  <pre><code>@Value(value = &quot;${app.serverKey}&quot;)
  String serverKey;
  
  @Value(value = &quot;${app.clientKey}&quot;)
  String clientKey;
  
  private CoreApi coreApi = new ConfigFactory(new Config(serverKey,clientKey)).getCoreApi();
  </code></pre>