Secrets in spring boot applications

Taken from:

If using @SpringBootApplication

maven

<dependency>
        <groupId>com.github.ulisesbocchio</groupId>
        <artifactId>jasypt-spring-boot-starter</artifactId>
        <version>2.1.0</version>
</dependency>

Properties files

jasypt.encryptor.password=${JASYPT_ENCRYPTOR_PASSWORD:}
my.secret=ENC(p5XGoOYt4xjYAVs7aCzxtmF+9Ab0uFpT)

Encrypting your password

Code - using the value

Last updated