Generate file from template and properties file in bash

How can i generate file from a template and a file containing the properties i want to replace in the template ?

template.xml

This is my @jdbc.url@, and my @user.db@ 

Properties files:

DEV.propeties
jdbc.url = url_for_dev
user.db = user_for_dev

PROD.propeties
jdbc.url = url_for_prod
user.db = user_for_prod

I want using the template and the properties file create a new file. I know it can be done using sed, but with sed i have to put the values in the command. I want the template be configured from a properties files.

How can be donde ?