If your using Maven you can create profiles for each different environment.
e.g
local.filter.properties
dev.filter.properties
beta.filter.properties
Now in the pom.xml you can define some profiles and point them to the different properties files.
<profile>
<id>dev</id>
<build>
<filters>
<filter>src/main/filters/dev.filter.properties</filter>
</filters>
</build>
</profile>
<profile>
<id>java</id>
<properties>
<idna.build.deployment.environment>JAVA</idna.build.deployment.environment>
</properties>
<build>
<filters>
<filter>src/main/filters/java.filter.properties</filter>
</filters>
</build>
</profile>
So when you build you select the profile that you want and in each profile you define the variables for the db user name password etc..
yourapp.db.username=UserDev
yourapp.db.password=password
and in your database.conf reference the property by its variable name
username=${yourapp.db.username}
password=${yourapp.db.password}
Now when you build your app you select the profile appropriate for the deployment your doing. This way the conf will get populated with the correct username and password at compile time allowing you to have just a single database.conf file.