Skip to content

justas-eu/spring-encrypted-properties-dojo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-encrypted-properties-dojo

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

Integration with jib

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

About

Dojo how to set up spring boot with encrypted properties

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages