Weekend Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale65best

Free VMware 2V0-72.22 Practice Exam with Questions & Answers | Set: 2

Questions 11

Which two statements are true about @Controller annotated classes? (Choose two.)

Options:
A.

The @Controller annotated classes can only render views.

B.

The classes are eligible for handling requests in Spring MVC.

C.

The classes must be annotated together with @EnableMvcMappings to be discovered via component scanning.

D.

@Controller is interchangeable with @RestController with no extra code changes for the methods inside the class.

E.

The @Controller annotation is a stereotype annotation like @Component.

VMware 2V0-72.22 Premium Access
Questions 12

Which three dependencies are provided by the spring-boot-starter-test? (Choose three.)

Options:
A.

Cucumber

B.

Hamcrest

C.

spring-test

D.

Junit

E.

EasyMock

F.

PowerMock

Questions 13

Which two statements are correct when @SpringBootApplication is annotated on a class? (Choose two.)

Options:
A.

It causes Spring Boot to enable auto-configuration by default.

B.

Component scanning will start from the package of the class.

C.

All other annotations on the class will be ignored.

D.

Methods in the class annotated with @Bean will be ignored.

E.

A separate ApplicationContext will be created for each class annotated with

@SpringBootApplication.

Questions 14

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.

Questions 15

Which two annotations indicate that the transaction for a transactional test method should be committed after the test method has completed? (Choose two.)

Options:
A.

@SqlMergeMode(false)

B.

@Rollback(false)

C.

@Commit

D.

@Sql(alwaysCommit=true)

E.

@Transactional(commit=true)

Questions 16

Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)

Options:
A.

An external monitoring system must be used with Actuator.

B.

The metrics endpoint /actuator/metrics is exposed over HTTP by default.

C.

Timer measures both the number of timed events and the total time of all events timed.

D.

Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and DistributionSummary.

E.

A metric must be created with one or more tags.

Questions 17

Which two statements are correct regarding the @EnableAutoConfiguration annotation? (Choose two.)

Options:
A.

It is a meta-annotation on the @SpringBootApplication composed annotation.

B.

It enables auto-configuration of the ApplicationContext by attempting to guess necessary beans.

C.

It is meta-annotation on the @SpringBootConfiguration composed annotation.

D.

It has the same effect regardless of the package of the class that is annotated with it.

E.

It ensures auto-configuration is applied before user-defined beans have been registered.

Questions 18

Which two are required to use transactions in Spring? (Choose two.)

Options:
A.

Add @EnableTransactionManagement to a Java configuration class.

B.

Annotate a class, an interface, or individual methods requiring a transaction with the @Transactional

annotation.

C.

A class must be annotated with @Service and @Transaction.

D.

A class requiring a transaction must implement the TransactionInterceptor interface.

E.

Write a Spring AOP advice to implement transactional behavior.

Questions 19

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

Options:
A.

Use the @AutoConfigureAfter or @AutoConfigureBefore annotations to apply configuration in a specific order.

B.

Disable specific auto-configuration classes by using the exclude attribute on the

@EnableAutoConfiguation annotation.

C.

Provide customized auto-configuration by subclassing the provided Spring Boot auto-configuration classes.

D.

Enable component scanning within auto-configuration classes to find necessary components.

E.

Control the order of auto-configuration classes applied with @AutoConfigureOrder.

Questions 20

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.