Saturday, May 22, 2021

Passing parameters into springboot application

  • User OS env variable
  • Use java -Dk1=v1 -Dk2=v2
  • Program argument java -jar my.jar --k1=v1 --k2=v2
  • Use an external application.properties file and pointing to it with export spring.config.location=/tmp/application.properties or passing it in with java parameter -Dspring.config.location=/tmp/application.properties


1 comment:

Jamie Foxx said...

Thank you for sharing such a useful article. I had a great time. This article was fantastic to read. Continue to publish more articles on

Data Engineering Solutions 

Data Analytics Service Provider

Data Modernization Services

Machine Learning Services