Pass an instance of java.util.Properties to Configuration.setProperties().
Include <property> elements in hibernate.cfg.xml
Set System properties using java -Dproperty=value.
Use addClass() method of Configuration object
Use addResource() method of Configuration object
Place hibernate.properties in a root directory of the classpath.
|