Reputation: 2626
What is the order of precedence between hibernate.properties and hibernate.cfg.xml ?
For what I know hibernate.cfg.xml (if exists in the app's classpath) overrides hibernate.properties. Is my assumption correct ?
Thank you
Upvotes: 11
Views: 7755
Reputation: 597224
From the documentation:
An alternative approach to configuration is to specify a full configuration in a file named hibernate.cfg.xml. This file can be used as a replacement for the hibernate.properties file or, if both are present, to override properties.
Upvotes: 18