Free 2V0-72.22 Exam Braindumps
Professional Develop VMware Spring Questions 32–45 (page: 4)

Updated On: 1-Feb-2026

Which two statements are true regarding @DataJpaTest? (Choose two.)

  1. TestEntityManager provides all methods that are provided by EntityManager and more.
  2. If an embedded database is on the classpath, it will be used to configure a DataSource by default.
  3. It can be used for testing both JPA components and NoSQL components.
  4. It auto-configures a TestEntityManager bean.
  5. It can be used for testing JdbcTemplate.

Answer(s): B,D


Reference:

https://docs.spring.io/spring-
boot/docs/current/api/org/springframework/boot/test/autoconfigure/ orm/jpa/DataJpaTest.html



Which two statements are true regarding storing user details in Spring Security? (Choose two.)

  1. With a custom UserDetailsService defined in the ApplicationContext, Spring Boot still creates the default user.
  2. Passwords must be hashed and the default hashing algorithm is MD5.
  3. User details can be stored in custom storage and retrieve them by implementing the UserDetailsService interface.
  4. User details can be stored in a database, in LDAP, or in-memory.
  5. The user details includes username and password but not authorities.

Answer(s): A,E



Which two statements are correct regarding Spring Boot auto-configuration? (Choose two.)

  1. Auto-configuration uses @Conditional annotations to constrain when it should apply.
  2. Auto-configuration could apply when a bean is missing but not when a bean is present.
  3. Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.
  4. Auto-configuration could apply when a bean is present but not when a bean is missing.
  5. Auto-configuration is applied before user-defined beans have been registered.

Answer(s): D,E



Refer to the exhibit.



It is a Java code fragment from a Spring application.
Which statement is true with regard to the above example? (Choose the best answer.)

  1. This syntax is invalid because the result of the getBean() method call should be cast to ClientService.
  2. It will return a bean called ClientService regardless of its id or name.
  3. This syntax is invalid because the bean id must be specified as a method parameter.
  4. It will return a bean of the type ClientService regardless of its id or name.

Answer(s): D



Refer to the exhibit.



How can a response status code be set for No Content (204)? (Choose the best answer.)

  1. Annotate the update() handler method with @PutMapping("/store/orders/{id"}", HttpStatus.NO_CONTENT).
  2. Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
  3. Annotate the update() handler method with @ResponseEntity(204).
  4. The update() handler method cannot return a void type, it must return a ResponseEntity type.

Answer(s): C


Reference:

https://stackoverflow.com/questions/55691288/is-this-the-correct-way-to-return-204-no- content- using-spring



Viewing page 4 of 13
Viewing questions 16 - 20 out of 90 questions


Post your Comments and Discuss VMware 2V0-72.22 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!