I currently have a regular SpringBoot App that I'm splitting into 2 applications in order to gain some of the benefits from Spring Cloud Dataflow and Spring Batch:
- A SpringBoot app responsible for detecting specific events and launching new Batch tasks throught Spring Cloud Dataflow REST API
- A SpringBoot + Spring Batch task which will be registered to SCDF from it's jar on our Nexus and called upon new events are polled.
I already got both apps working and I'm beginning to move things around. Now my concern is, this batch application has an application.yml
file containing datasources and other important properties that can (shouldn't, but can) updated very often.
On my current approach, my application is packaged inside a Docker container and I start my app saying where the definitive application.yml
file. This allows me to have one specific .yml
file per environment, since I'm not allowed here to use Spring Profiles to organize variables per env. Devs shouldn't be able to know Prod vars.
Here's the entry point of my Dockerfile:
ENTRYPOINT ["java","-Dspring.profiles.active=docker","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar", "--spring.config.location=classpath:/application.yml,file:/tmp/config/application.yml"]
What would be the best way to keep my properties file externalized using this new approach of a SCDF task? Should I go for Spring Cloud Config? Does passing the --spring.config.location
as an job argument actually work?
Keeping in mind my restricting mentioned above, can Spring Cloud still be addressed as a possible solution?
Thanks in advance for any help!
Best regards,
Enrico