title: Loading credentials from config
body: <p>I am writing simple rest client with spring boot. In my service class i am using RestTemplate. How to avoid hardcoding url and ApiKey? I tried to use application.properties file and Value annotation but i get null pointer exception.
  Edit: 
  Injected fields via constructor (using Value annotation). Is it a good practice?</p>