2V0-72.22PSE · Question #8
Which two statements are true about Spring Boot and Spring Data JPA? (Choose two.)
The correct answer is C. Spring Data JPA is the only implementation for relational databases. E. Embedded Databases (H2, HSQLDB, Derby) are not re-created during the startup. There appears to be an error in the provided answer key. Based on Spring Boot and Spring Data JPA documentation, A and B are the true statements, not C and E. Here is the accurate explanation: Why A is correct: @EntityScan lets you customize which packages are scanned for JPA…
Question
Which two statements are true about Spring Boot and Spring Data JPA? (Choose two.)
Options
- A@EntityScan and spring.jpa.* properties can be used to customize Spring Data JPA.
- BAny kind of Hibernate property can be passed to Spring Data JPA like
- CSpring Data JPA is the only implementation for relational databases.
- DScanning of JPA Entities can not be customized, the whole classpath is scanned.
- EEmbedded Databases (H2, HSQLDB, Derby) are not re-created during the startup.
How the community answered
(19 responses)- A5% (1)
- C89% (17)
- D5% (1)
Explanation
There appears to be an error in the provided answer key. Based on Spring Boot and Spring Data JPA documentation, A and B are the true statements, not C and E. Here is the accurate explanation:
Why A is correct: @EntityScan lets you customize which packages are scanned for JPA entities, and spring.jpa.* properties (including spring.jpa.properties.hibernate.*) are the standard way to configure JPA behavior in Spring Boot.
Why B is correct (implied): Hibernate-specific properties can be passed through Spring Boot using the spring.jpa.properties.hibernate.* namespace, forwarding them directly to the underlying Hibernate session factory.
Why C is wrong (a distractor): Spring Data JPA is not the only Spring Data module for relational databases - Spring Data JDBC is another option, and it intentionally bypasses JPA entirely.
Why D is wrong: Entity scanning can be customized using @EntityScan, contradicting this statement directly.
Why E is wrong: Spring Boot does re-create embedded databases (H2, HSQLDB, Derby) by default on startup - the ddl-auto property defaults to create-drop for embedded datasources.
Memory tip: Think "A and B configure, C and D lie, E misleads" - the two customization options (annotation + properties) are the true pair. If your exam source lists C and E as correct, treat it as a flawed question.
Topics
Community Discussion
No community discussion yet for this question.