Spring war creation application.properties

I am trying to create a war file for my spring boot application. Did not check in application.properties file to git due to application related security tokens stored in it. I want to store application.properties in pipeline folder structure, read a local file in a task and copy it to application, compile , create a war. Is it possible to read a local file to a job? Please let me know and how?

The general way to do this would be to store the secret parts of your application properties in the Concourse credential manager and then use the ((my_secret)) interpolation syntax in a job to inject those secrets in when building the war. How you choose to get the secrets in to that file is up to you - you might choose to template each individual secret in or you might just want to dump the whole application.properties file in a single credential.