spring boot with jasypt jvm argument alternative

416 Views Asked by At

I know that spring boot works with jasypt, by supplying jvm argument -Djasypt.encryptor.password=password , the framework will use it to decrypt. However, in my use case, we cannot supply jvm argument, how do i do this programtically in code instead?

1

There are 1 best solutions below

0
Stempler On BEST ANSWER

You can set the argument manullay in your code.

System.setProperty("jasypt.encryptor.password", "password");

You see more details here