Hibernate.properties vs hibernate.cfg.xml

What is the priority order between hibernate.properties and hibernate.cfg.xml?

For what I know, hibernate.cfg.xml (if exists in the path to the application classes) overrides hibernate.properties. Is my assumption correct?

thanks

+6
source share
1 answer

From the documentation:

An alternative approach to customization is to specify the full configuration in a file called hibernate.cfg.xml. This file can be used as a replacement for the hibernate.properties file or , if both are present, to override properties.

+12
source

Source: https://habr.com/ru/post/891388/


All Articles