ulisesbocchio / jasypt-spring-boot

Jasypt integration for Spring boot
MIT License
2.88k stars 514 forks source link

Failed to bind properties under 'spring.datasource.password' to java.lang.String #238

Closed cobar79 closed 3 years ago

cobar79 commented 4 years ago

Boot 2.3.2, jasypt 3.0.3 and 2.1.2 regardless of iv-generator-classname NoIvGenerator or RandomIvGenerator `jasypt: encryptor: password: fubar iv-generator-classname: org.jasypt.RandomIvGenerator

spring: password: ENC(yaddayaddayadda) `

With or without @EnableAutoConfiguration @SpringBootApplication @EnableAutoConfiguration

Currently working in boot 2.2.4, jasypt 3.0.2 with encryptor.password in database

startjava commented 3 years ago

same to me!

cobar79 commented 3 years ago

After painful research I changed the debug level on spring and found that the issue was jasypt couldn't decrypt the password that I had encrypted using the online tool. Using jasypt 3.0.3 there is no command line CLI in the jar. The online tool doesn't work. Added: ``

com.github.ulisesbocchio jasypt-maven-plugin 3.0.3

Run: mvn jasypt:encrypt-value -Djasypt.encryptor.password="the password" -Djasypt.plugin.value="theValueYouWantToEncrypt" ``

``

spring-boot-starter-parent
    <version>2.3.2.RELEASE</version>
3.0.3 ``