Labour Day Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: suredis

VMware 2V0-72.22 Professional Develop VMware Spring Exam Practice Test

Page: 1 / 6
Total 60 questions

Professional Develop VMware Spring Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$42  $119.99

PDF Study Guide

  • Product Type: PDF Study Guide
$36.75  $104.99
Question 1

If a class is annotated with @Component, what should be done to have Spring automatically detect the annotated class and load it as a bean? (Choose the best answer.)

Options:

A.

Ensure a valid bean name in the @Component annotation is specified.

B.

Ensure a valid @ComponentScan annotation in the Java configuration is specified.

C.

Ensure a valid @Scope for the class is specified.

D.

Ensure a valid @Bean for the class is specified.

Question 2

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.

B.

Any kind of Hibernate property can be passed to Spring Data JPA like spring.jpa.properties.xxx.

C.

Spring Data JPA is the only implementation for relational databases.

D.

Scanning of JPA Entities can not be customized, the whole classpath is scanned.

E.

Embedded Databases (H2, HSQLDB, Derby) are not re-created during the startup.

Question 3

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

Options:

A.

Spring Data implementations exist for many data storage types, such as MongoDB, Neo4j, and Redis.

B.

Spring Data works by applying the JPA annotations to data stores such as MongoDB, Neo4j, and Redis.

C.

Spring Data can greatly reduce the amount of “boilerplate” code typically needed for data access.

D.

Spring Data is specifically designed for JPA, JDBC, and relational database access only.

E.

Spring Data cannot be used together with Spring MVC.

Question 4

What two options are auto-configured Spring Boot Actuator HealthIndicators? (Choose two.)

Options:

A.

DataSourceHealthIndicator

B.

GoogleCloudDataStoreHealthIndicator

C.

DynamoDBHealthIndicator

D.

RabbitHealthIndicator

E.

OktaHealthIndicator

Question 5

Which two statements describe Spring JdbcTemplate? (Choose two.)

Options:

A.

All JdbcTemplate methods throw SQLException which you are required to handle.

B.

The JdbcTemplate provides the ability to work with result sets.

C.

The JdbcTemplate can only perform update but not insert to the database.

D.

The JdbcTemplate provides methods for query execution.

E.

The JdbcTemplate generates SQL statements.

Question 6

Refer to the exhibit.

Which option is a valid way to retrieve the account id? (Choose the best answer.)

Options:

A.

Add @PathVariable(“id”) String accountId argument to the update() handler method.

B.

Add @PathVariable long accountId argument to the update() handler method.

C.

Add @RequestParam long accountId argument to the update() handler method.

D.

Add @RequestParam(“id”) String accountId argument to the update() handler method.

Question 7

Spring Boot will find and load property files in which of the following? (Choose the best answer.)

Options:

A.

A *.properties file matching the name of the class annotated with @SpringBootApplication.

B.

config.properties or config.yml, usually located in the classpath root.

C.

application.properties or application.yml, usually located in the classpath root.

D.

env.properties or env.yml, usually located in the classpath root.

Question 8

Refer to the exhibit.

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

Options:

A.

Annotate the update() handler method with @PutMapping(“/store/orders/{id”}”, HttpStatus.NO_CONTENT).

B.

Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).

C.

Annotate the update() handler method with @ResponseEntity(204).

D.

The update() handler method cannot return a void type, it must return a ResponseEntity type.

Question 9

Which two statements about the @Autowired annotation are true? (Choose two.)

Options:

A.

@Autowired fields are injected after any config methods are invoked.

B.

Multiple arguments can be injected into a single method using @Autowired.

C.

By default, if a dependency cannot be satisfied with @Autowired, Spring throws a RuntimeException.

D.

If @Autowired is used on a class, field injection is automatically performed for all dependencies.

E.

@Autowired can be used to inject references into BeanPostProcessor and

BeanFactoryPostProcessor.

Page: 1 / 6
Total 60 questions