ulisesbocchio / jasypt-spring-boot

Jasypt integration for Spring boot
MIT License
2.93k stars 523 forks source link

When Spring Cloud triggers Refresh, Jasypt decrypts properties that have already been overwritten, resulting in failed context refresh #397

Open Lumanman-a opened 3 months ago

Lumanman-a commented 3 months ago

App Resources like: image The current application environment is prehub. The jasyptStringEncryptor configuration of Jasypt in the yml file of prehub is different from application.yml. application.yml and application-prepub.yml files have the same configuration items. During the startup phase, if there are no exceptions, Spring will select the configuration item and decryptor of application-prepub.yml for decryption. However, during Spring Cloud Refresh, Spring Cloud parses all configuration item files, causing Spring to use the decryptor configured in application-prepub.yml to decrypt the encrypted items in application-yml. image Decryption failed at this time, unable to complete Refresh context.