ExamGecko
Home Home / VMware / 2V0-72.22

VMware 2V0-72.22 Practice Test - Questions Answers, Page 5

Question list
Search
Search

Refer to the exhibit.

What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)

A.
clientServiceImpl (starting with lowercase “c”)
A.
clientServiceImpl (starting with lowercase “c”)
Answers
B.
clientServiceImpl (starting with uppercase “C”)
B.
clientServiceImpl (starting with uppercase “C”)
Answers
C.
clientService (starting with lowercase “c”)
C.
clientService (starting with lowercase “c”)
Answers
D.
ClientService (starting with uppercase “C”)
D.
ClientService (starting with uppercase “C”)
Answers
Suggested answer: D

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

A.
TestEntityManager provides all methods that are provided by EntityManager and more.
A.
TestEntityManager provides all methods that are provided by EntityManager and more.
Answers
B.
If an embedded database is on the classpath, it will be used to configure a DataSource by default.
B.
If an embedded database is on the classpath, it will be used to configure a DataSource by default.
Answers
C.
It can be used for testing both JPA components and NoSQL components.
C.
It can be used for testing both JPA components and NoSQL components.
Answers
D.
It auto-configures a TestEntityManager bean.
D.
It auto-configures a TestEntityManager bean.
Answers
E.
It can be used for testing JdbcTemplate.
E.
It can be used for testing JdbcTemplate.
Answers
Suggested answer: B, D

Explanation:

Reference: https://docs.spring.io/springboot/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.)

A.
With a custom UserDetailsService defined in the ApplicationContext, Spring Boot still creates the default user.
A.
With a custom UserDetailsService defined in the ApplicationContext, Spring Boot still creates the default user.
Answers
B.
Passwords must be hashed and the default hashing algorithm is MD5.
B.
Passwords must be hashed and the default hashing algorithm is MD5.
Answers
C.
User details can be stored in custom storage and retrieve them by implementing the UserDetailsService interface.
C.
User details can be stored in custom storage and retrieve them by implementing the UserDetailsService interface.
Answers
D.
User details can be stored in a database, in LDAP, or in-memory.
D.
User details can be stored in a database, in LDAP, or in-memory.
Answers
E.
The user details includes username and password but not authorities.
E.
The user details includes username and password but not authorities.
Answers
Suggested answer: A, E

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

A.
Auto-configuration uses @Conditional annotations to constrain when it should apply.
A.
Auto-configuration uses @Conditional annotations to constrain when it should apply.
Answers
B.
Auto-configuration could apply when a bean is missing but not when a bean is present.
B.
Auto-configuration could apply when a bean is missing but not when a bean is present.
Answers
C.
Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.
C.
Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.
Answers
D.
Auto-configuration could apply when a bean is present but not when a bean is missing.
D.
Auto-configuration could apply when a bean is present but not when a bean is missing.
Answers
E.
Auto-configuration is applied before user-defined beans have been registered.
E.
Auto-configuration is applied before user-defined beans have been registered.
Answers
Suggested answer: D, E

Refer to the exhibit.

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

A.
Annotate the update() handler method with @PutMapping(“/store/orders/{id”}”,HttpStatus.NO_CONTENT).
A.
Annotate the update() handler method with @PutMapping(“/store/orders/{id”}”,HttpStatus.NO_CONTENT).
Answers
B.
Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
B.
Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
Answers
C.
Annotate the update() handler method with @ResponseEntity(204).
C.
Annotate the update() handler method with @ResponseEntity(204).
Answers
D.
The update() handler method cannot return a void type, it must return a ResponseEntity type.
D.
The update() handler method cannot return a void type, it must return a ResponseEntity type.
Answers
Suggested answer: C

Explanation:

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

Which statement describes the @AfterReturning advice type? (Choose the best answer.)

A.
The advice is invoked only if the method returns successfully but not if it throws an exception.
A.
The advice is invoked only if the method returns successfully but not if it throws an exception.
Answers
B.
The @AfterReturning advice allows behavior to be added after a method returns even if it throws an exception.
B.
The @AfterReturning advice allows behavior to be added after a method returns even if it throws an exception.
Answers
C.
The advice has complete control over the method invocation; it could even prevent the method from being called at all.
C.
The advice has complete control over the method invocation; it could even prevent the method from being called at all.
Answers
D.
Typically used to prevent any exception, thrown by the advised method, from propagating up the call-stack.
D.
Typically used to prevent any exception, thrown by the advised method, from propagating up the call-stack.
Answers
Suggested answer: A

Explanation:

Reference: https://www.amitph.com/spring-aop-afterreturning-advice

Refer to the exhibit.

Which statement is true? (Choose the best answer.)

A.
CustomerRepository should be a class, not an interface.
A.
CustomerRepository should be a class, not an interface.
Answers
B.
JPA annotations are required on the Customer class to successfully use Spring Data JDBC.
B.
JPA annotations are required on the Customer class to successfully use Spring Data JDBC.
Answers
C.
An implementation of this repository can be automatically generated by Spring Data JPA.
C.
An implementation of this repository can be automatically generated by Spring Data JPA.
Answers
D.
A class that implements CustomerRepository must be implemented and declared as a Spring Bean.
D.
A class that implements CustomerRepository must be implemented and declared as a Spring Bean.
Answers
Suggested answer: C

Which two statements are correct regarding the Actuator info endpoint? (Choose two.)

A.
It provides configuration options through which only an authenticated user can display application information.
A.
It provides configuration options through which only an authenticated user can display application information.
Answers
B.
It is not enabled by default.
B.
It is not enabled by default.
Answers
C.
It can be used to display arbitrary application information.
C.
It can be used to display arbitrary application information.
Answers
D.
It can be used to change a property value on a running application.
D.
It can be used to change a property value on a running application.
Answers
E.
Typically it is used to display build or source control information.
E.
Typically it is used to display build or source control information.
Answers
Suggested answer: B, C

Explanation:

Reference: https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html

Which statement about @TestPropertySource annotation is true? (Choose the best answer.)

A.
Java system properties have higher precedence than the properties loaded from @TestPropertySource.
A.
Java system properties have higher precedence than the properties loaded from @TestPropertySource.
Answers
B.
Properties defined @PropertySource are not loaded if @TestPropertySource is used.
B.
Properties defined @PropertySource are not loaded if @TestPropertySource is used.
Answers
C.
@TestPropertySource annotation loads a properties file relative to the root of the project by default.
C.
@TestPropertySource annotation loads a properties file relative to the root of the project by default.
Answers
D.
Inlined properties defined in @TestPropertySource can be used to override properties defined in property files.
D.
Inlined properties defined in @TestPropertySource can be used to override properties defined in property files.
Answers
Suggested answer: D

Explanation:

Reference: https://www.concretepage.com/spring-5/testpropertysource-example-spring-test

Which two statements are correct regarding the Health Indicator status? (Choose two.)

A.
The last status in a sorted list of HealthIndicators is used to derive the final system health.
A.
The last status in a sorted list of HealthIndicators is used to derive the final system health.
Answers
B.
The status with the least severity is used as the top-level status.
B.
The status with the least severity is used as the top-level status.
Answers
C.
Custom status values can be created.
C.
Custom status values can be created.
Answers
D.
The built-in status values are DOWN, OUT_OF_SERVICE, UNKNOWN, and UP in decreasing order of severity.
D.
The built-in status values are DOWN, OUT_OF_SERVICE, UNKNOWN, and UP in decreasing order of severity.
Answers
E.
The severity order cannot be changed due to security reasons.
E.
The severity order cannot be changed due to security reasons.
Answers
Suggested answer: C, D

Explanation:

Reference: https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/production-readyendpoints.html

Total 60 questions
Go to page: of 6