On the server side, a hook wxould not modify files.
But if your remote repo does checkout those files into a working tree (through a post-receive hook for instance, then you can associate to your remote git a content filter driver that would make that kind of transformation.
This assume you have access to the remote Git hosting server (meaning it is not GitHub.com or BitBucket.org or GitLab.com)
If that is the case, through a .gitattributes
declaration, you can declare a smudge
script which would, for any application.properties
file, make a sort of its content.

That would be done automatically on checkout.