Multiple choice technology web technology

What is the way to pass configuration properties to Hibernate?

  1. Pass an instance of java.util.Properties to Configuration.setProperties().

  2. Place hibernate.properties in a root directory of the classpath.

  3. Set System properties using java -Dproperty=value.

  4. All the above

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

Hibernate accepts configuration through all three methods: passing Properties directly to Configuration object, placing hibernate.properties in classpath root, or setting System properties via -D flags. This flexibility allows different deployment and configuration strategies.