I've this file hibernate.cfg.xml that I use to configure hibernate at sturtup.
<property name="hibernate.connection.username">dbUser</property>
<property name="hibernate.connection.password">1234</property>
I've a properties file that it's called config.properties that hold all other configurations used into the application.
How can I set "hibernate.connection.username" parameter from the properties file (config.properties) so I have only one file to edit?
DataSourceusing Apache DBCP, C3P0, HikariCP or another vendor, and then follow the steps shown here: stackoverflow.com/q/4406935/1065197. Note that when you create yourDataSourceinstance, you can apply the parameters from a properties file as you want/need.