I have been unable to get jasypt to work with Spring 4 and decrypt property files specified from the @PropertySource annotations, and accessing these via the @Value annotation.
Attached is a sample maven app with a junit test demonstrating the failure. Instead of decrypting the property, you get the raw string including the wrapping ENC()
if instead of specifying the config file via
@PropertySource("config.properties")
I include it in the creation of the PropertySourcesPlaceholderConfigurer with:
configurer.setLocation(new ClassPathResource("config.properties"));
Then everything works and the property is decrypted, but I would like to use the Spring annotations for specifying property files (especially for @Import 'ed configs who will not know to add them to the encrypted version)