title: Why methods doesn't see values set in constructor? (Spring Boot)
body: <p>I have a class AuthorizationService like this:</p>
  <pre><code>@Service
  public class AuthorizationService {
  
  private final String code;
  private final String client_id;
  private final String redirect_uri;
  private final String scope;
  private final String show_dialog;
  
  @Autowired
  public AuthorizationService(
          @Value(&quot;${spotify-property.response_type}&quot;) String code,
          @Value(&quot;${spotify-property.client_id}&quot;) String client_id,
          @Value(&quot;${spotify-property.redirect_uri}&quot;) String redirect_uri,
          @Value(&quot;${spotify-property.scope}&quot;) String scope,
          @Value(&quot;${spotify-property.redirect_uri}&quot;) String show_dialog) {
      this.code = code;
      this.client_id = client_id;
      this.redirect_uri = redirect_uri;
      this.scope = scope;
      this.show_dialog = show_dialog;
      System.out.println(code); //works
  }
  
  public ResponseEntity&lt;HttpHeaders&gt; getSpotifyRedirectionCode() {
      HttpHeaders headers = new HttpHeaders();
  
      System.out.println(client_id); //doesn't work
      System.out.println(this.code); //does not work either
      System.out.println(redirect_uri);
      System.out.println(scope);
      System.out.println(show_dialog);
  
      //more code doesn't matter
  
      return new ResponseEntity&lt;&gt;(headers, HttpStatus.TEMPORARY_REDIRECT);
  }
  </code></pre>
  <p>Why these variables are ok in constructor but in methods are null, how to set them in correct way? Also</p>
  <pre><code>@Value(&quot;${spotify-property.response_type}&quot;) 
  private final String code;
  </code></pre>
  <p>does not work either.</p>