title: Spring boot cannot read Vault secret: IllegalArgumentException Could not resolve placeholder
body: <p>Below is my <code>bootstrap.yml</code> file:</p>
  <pre class="lang-yaml prettyprint-override"><code>spring.application.name: backend
  spring.cloud.vault:
    host: localhost
    port: 8200
    scheme: http
    authentication: token
    token: root
  </code></pre>
  <p>My secrets are located at <code>secret/backend</code></p>
  <p><a href="https://i.stack.imgur.com/Wauti.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wauti.png" alt="enter image description here" /></a></p>
  <p>I am trying to read these secrets in a controller class like so:</p>
  <pre class="lang-java prettyprint-override"><code>    @Value(&quot;${masterpassword}&quot;)
      private String masterPassword;
  </code></pre>
  <p>but this leads to <code>IllegalArgumentException</code> as spring complains it cannot find any <code>masterpassword</code>:</p>
  <pre><code>org.springframework.beans.factory.BeanCreationException: 
  Error creating bean with name 'secretsController': Injection of autowired dependencies failed; 
  nested exception is java.lang.IllegalArgumentException: 
  Could not resolve placeholder 'masterpassword' in value &quot;${masterpassword}&quot;
  </code></pre>
  <p>Can someone please tell me what I am doing wrong? Thanks for your help :)</p>