Dojo how to set up spring boot with encrypted properties
This project created following this tutorial: https://blog.novatec-gmbh.de/encrypted-properties-spring/
Encrypted property looks like this:
encrypted.property={cipher}de80c695fb48cdc5af050342403a9920544dc5a10fb647e8f3c177260551e591
Compile
mvn clean install -DskipTests
Run
ENCRYPT_KEY=dojo-passwd java -jar target/encrypted-properties-0.0.1-SNAPSHOT.jar
Check
curl http://localhost:8080/test
https://github.com/GoogleContainerTools/jib/blob/master/README.md
Make sure you have docker install and configured
mvn compile jib:dockerBuild
List images
docker images
Run it
docker run -it --rm -e ENCRYPT_KEY='dojo-passwd' -p 8080:8080 encrypted-properties
Check again
curl http://localhost:8080/test
Clean up
mvn clean docker rmi encrypted-properties