spring-cloud / spring-cloud-config

External configuration (server and client) for Spring Cloud
Apache License 2.0
1.96k stars 1.29k forks source link

Local encrypted properties can't be decrypted within logback-spring.xml #398

Closed cloorc closed 7 years ago

cloorc commented 8 years ago

I tried to use spring boot logback extensions and spring cloud config feature. What I want to do is use DBAppender and set data source's password from encrypted properties. But I've found it cannot be decrypted in logback-spring.xml.

Is it too early? If I try to retrieve the encrypted value by @Value in CommandLineRunner#run(), it's fine.

Could I use encrypted properties in logback-spring.xml? And how?

spencergibb commented 8 years ago

logging is configured very early in spring boot. My guess is that it's too early.

3792274 commented 7 years ago

try this https://github.com/ulisesbocchio/jasypt-spring-boot

cloorc commented 7 years ago

Thanks! It seems like a great work!