nerdexam
Broadcom-VMware

2V0-72.22PSE · Question #93

Which two statements are true about Spring Data JPA? (Choose two.)

The correct answer is A. spring-boot-starter-data-jpa pulls in all necessary dependencies for Spring Data JPA. D. Auto-configuration creates the needed Beans like DataSource and JpaTransactionManager. A is correct because spring-boot-starter-data-jpa is a convenience starter POM that bundles Hibernate, Spring Data JPA, and all required transitive dependencies - you add one dependency and you're ready to go. D is correct because Spring Boot's auto-configuration mechanism…

Data Access

Question

Which two statements are true about Spring Data JPA? (Choose two.)

Options

  • Aspring-boot-starter-data-jpa pulls in all necessary dependencies for Spring Data JPA.
  • BSpring Data JPA can be only used in combination with Hibernate.
  • CThe persistence.xml has to be provided for Spring Data JPA as it is defined in the standard.
  • DAuto-configuration creates the needed Beans like DataSource and JpaTransactionManager.
  • EScanning of JPA Entities can not be customized.

How the community answered

(27 responses)
  • A
    85% (23)
  • B
    4% (1)
  • C
    7% (2)
  • E
    4% (1)

Explanation

A is correct because spring-boot-starter-data-jpa is a convenience starter POM that bundles Hibernate, Spring Data JPA, and all required transitive dependencies - you add one dependency and you're ready to go. D is correct because Spring Boot's auto-configuration mechanism automatically creates essential beans (DataSource, EntityManagerFactory, JpaTransactionManager) based on classpath detection and application.properties, eliminating boilerplate configuration.

B is wrong - Spring Data JPA is an abstraction layer over JPA (the specification), so it can work with any compliant JPA provider such as EclipseLink or OpenJPA, not just Hibernate. C is wrong - Spring Boot's auto-configuration makes persistence.xml entirely optional; entity scanning and datasource config are handled through @SpringBootApplication and application properties. E is wrong - entity scanning is fully customizable via @EntityScan to specify which packages to scan.

Memory tip: Think of the letters A and D as "Auto-configuration Does everything" - Spring Boot Automatically pulls in dependencies (starter) and Deploys the needed beans, so you write zero infrastructure code.

Topics

#Spring Data JPA#Auto-configuration#Dependencies#JPA Configuration

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22PSE Practice