title: How to set GOOGLE_APPLICATION_CREDENTIALS in spring boot app
body: <p>I am attempting to use the google vision library in java. The steps specify that I need to setup my auth credentials in order to start using the <a href="https://developers.google.com/identity/protocols/application-default-credentials" rel="noreferrer">this</a> library . I was able to generate my json property file from API Console Credentials page and I placed it in my spring boot app in the resources folder.</p>
  
  <p>I think updated my application.properties file to include the value like so:</p>
  
  <pre><code>GOOGLE_APPLICATION_CREDENTIALS=datg-avatar-generator-9dc9155cd5bd.json
  </code></pre>
  
  <p>I'm also setting my property source in my controller like so:</p>
  
  <pre><code>@PropertySource("${GOOGLE_APPLICATION_CREDENTIALS}")
  </code></pre>
  
  <p>However, after doing that I'm still getting an error saying:</p>
  
  <pre><code>java.io.IOException: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
  </code></pre>