Closed Ravattailor closed 6 years ago
let me take a look
The problem is basically this: @Value("${jasypt.encryptor.password}") String password
which is trying to resolve a value for a ben that's gonna be used to resolve the value... so you get a circular dependency. I suggest you provide a EncryptablePropertyDetector instead if all you want is to change the encrypted property header.
I will though provide a mechanism to avoid this kind of problem.
should work out of the box with jasypt-spring-boot:2.1.0
The same problem was found in version 2.1.0
I used something like that:
@Component
public class ResolverConfig {
@Value("${secret}") String secret;
@Bean(name="encryptablePropertyResolver")
public EncryptablePropertyResolver encryptablePropertyResolver() {
return new CustomEncryptablePropertyResolver(secret);
}
}
The problem because of @Value("${secret}") String secret;
@component public class ResolverConfig { @value("${secret}") String secret;
and how to resolve this
I
am trying to read the password from properties file but getting this exception.stack trace:-
My configuration class
test-encrypted.properties file:-