Closed amitommishra closed 6 years ago
Build.gradle using com.github.ulisesbocchio:jasypt-spring-boot-starter
in Application.properties: spring.datasource.password=ENC(encrypted_password)
when calling actuator health it is not working. It works when i use non encrypted password.
Looks like actuator is not taking care of decryption when Jsypt is used.
Please read the documentation for jasypt-spring-boot
. You cannot place an encrypted property in application.properties
.
reference: http://www.jasypt.org/encrypting-configuration.html https://stackoverflow.com/a/23859824/544918
Can you please help me understand it why we cannot use as i see it mentioned same way in jsypt site
Example: datasource.driver=com.mysql.jdbc.Driver datasource.url=jdbc:mysql://localhost/reportsdb datasource.username=reportsUser datasource.password=ENC(G6N718UuyPE5bHyWKyuLQSm02auQPUtm)
The documentation that I linked to above describes how to use jasypt-spring-boot
. I've never used it before so I can only recommend that you read the documentation and use one of the two approaches that it describes (@EnableEncryptableProperties
or customization of your application's Environment
).