S

Shyam Dubey • 3.70K Points
Extraordinary

Q. How do you define an in-memory H2 database in Spring Boot?

  • (A) Include H2 dependency and no additional config
  • (B) Use spring.db.type=H2
  • (C) Define it in server.xml
  • (D) Use @EnableH2Database
  • Correct Answer - Option(A)
  • Views: 7
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
Adding the H2 dependency auto-configures an in-memory H2 database in Spring Boot.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.