Multiple choice technology web technology

What are the most common methods of configuring Hibernate?

  1. By placing hibernate.properties file in the classpath.

  2. Including <property> elements in hibernate.cfg.xml in the classpath.

  3. both 1 and 2

  4. none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Hibernate can be configured in two common ways: by placing a hibernate.properties file in the classpath, or by using XML configuration with elements in hibernate.cfg.xml in the classpath. Both approaches allow setting database connection, dialect, and other configuration properties.