This is a boilerplate you can try out to get started with Apache Spark (version 2.10) with Spring profile quickly: https://github.com/shenghuahe/sparkwithspringprofile

This should allow you to configure environment specific properties (i.e. path to read some input file) really easily.