Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. config-application-dev.properties: |
  2. server.port=5001
  3. server.compression.enabled=true
  4. azure.keyvault.uri=<URL>
  5. azure.keyvault.client-id=<CLIENTID>
  6. azure.keyvault.client-key=<CLIENTKEY>
  7.  
  8. @PropertySource({ "${propertiesDir}/${envTarget}/config/config-application-${envTarget}.properties" })
  9. public class Application{
  10. ...
  11. }
  12.  
  13. @Value("${azure-key-vault-secret}")
  14. private String mySecretProperty;
  15.  
  16. 2019-08-21 16:17:26.051 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException:
  17. Error creating bean with name 'exampleController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'secret-in-keyvault' in value "${secret-in-keyvault}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement