ExamGecko
Home Home / VMware / 2V0-72.22

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

Question list
Search
Search

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

A.
DataSourceHealthIndicator
A.
DataSourceHealthIndicator
Answers
B.
GoogleCloudDataStoreHealthIndicator
B.
GoogleCloudDataStoreHealthIndicator
Answers
C.
DynamoDBHealthIndicator
C.
DynamoDBHealthIndicator
Answers
D.
RabbitHealthIndicator
D.
RabbitHealthIndicator
Answers
E.
OktaHealthIndicator
E.
OktaHealthIndicator
Answers
Suggested answer: A, D

Explanation:

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

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

A.
@SqlMergeMode(false)
A.
@SqlMergeMode(false)
Answers
B.
@Rollback(false)
B.
@Rollback(false)
Answers
C.
@Commit
C.
@Commit
Answers
D.
@Sql(alwaysCommit=true)
D.
@Sql(alwaysCommit=true)
Answers
E.
@Transactional(commit=true)
E.
@Transactional(commit=true)
Answers
Suggested answer: B, C

Explanation:

Reference: https://stackoverflow.com/questions/9817388/junit-tests-always-rollback-thetransactions

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

A.
An external monitoring system must be used with Actuator.
A.
An external monitoring system must be used with Actuator.
Answers
B.
The metrics endpoint /actuator/metrics is exposed over HTTP by default.
B.
The metrics endpoint /actuator/metrics is exposed over HTTP by default.
Answers
C.
Timer measures both the number of timed events and the total time of all events timed.
C.
Timer measures both the number of timed events and the total time of all events timed.
Answers
D.
Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and DistributionSummary.
D.
Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and DistributionSummary.
Answers
E.
A metric must be created with one or more tags.
E.
A metric must be created with one or more tags.
Answers
Suggested answer: A, B

Which two statements are true regarding Spring Boot Testing? (Choose two.)

A.
@TestApplicationContext is used to define additional beans or customizations for a test.
A.
@TestApplicationContext is used to define additional beans or customizations for a test.
Answers
B.
Test methods in a @SpringBootTest class are transactional by default.
B.
Test methods in a @SpringBootTest class are transactional by default.
Answers
C.
@SpringBootTest is typically used for integration testing.
C.
@SpringBootTest is typically used for integration testing.
Answers
D.
Test methods annotated with @SpringBootTest will recreate the ApplicationContext.
D.
Test methods annotated with @SpringBootTest will recreate the ApplicationContext.
Answers
E.
@SpringBootTest without any configuration classes expects there is only one class annotated with @SpringBootConfiguration in the application.
E.
@SpringBootTest without any configuration classes expects there is only one class annotated with @SpringBootConfiguration in the application.
Answers
Suggested answer: C, D

Which two statements are true regarding bean creation? (Choose two.)

A.
A Spring bean can be explicitly created by annotating methods or fields by @Autowired.
A.
A Spring bean can be explicitly created by annotating methods or fields by @Autowired.
Answers
B.
A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package.
B.
A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package.
Answers
C.
A Spring bean can be implicitly created by annotating the class with @Bean and using the component- scanner to scan its package.
C.
A Spring bean can be implicitly created by annotating the class with @Bean and using the component- scanner to scan its package.
Answers
D.
A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.
D.
A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.
Answers
E.
A Spring bean can be explicitly created by annotating the class with @Autowired.
E.
A Spring bean can be explicitly created by annotating the class with @Autowired.
Answers
Suggested answer: B, E

Explanation:

Reference: https://docs.spring.io/spring-framework/docs/3.0.0.M4/spring-frameworkreference/html/ch03s10.html

https://howtodoinjava.com/spring-core/spring-beans-autowiring-concepts/

What are the two reasons Spring be used to build a Java application? (Choose two.)

A.
Spring automates a Java application build.
A.
Spring automates a Java application build.
Answers
B.
Spring provides a Dependency Injection container.
B.
Spring provides a Dependency Injection container.
Answers
C.
Spring automates deployment of Java applications to all of the major cloud providers.
C.
Spring automates deployment of Java applications to all of the major cloud providers.
Answers
D.
Spring provides comprehensive Java IDE support.
D.
Spring provides comprehensive Java IDE support.
Answers
E.
Spring provides abstractions over infrastructure such as persistence and messaging.
E.
Spring provides abstractions over infrastructure such as persistence and messaging.
Answers
Suggested answer: A, B

Explanation:

Reference: https://spring.io/why-spring

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

A.
All JdbcTemplate methods throw SQLException which you are required to handle.
A.
All JdbcTemplate methods throw SQLException which you are required to handle.
Answers
B.
The JdbcTemplate provides the ability to work with result sets.
B.
The JdbcTemplate provides the ability to work with result sets.
Answers
C.
The JdbcTemplate can only perform update but not insert to the database.
C.
The JdbcTemplate can only perform update but not insert to the database.
Answers
D.
The JdbcTemplate provides methods for query execution.
D.
The JdbcTemplate provides methods for query execution.
Answers
E.
The JdbcTemplate generates SQL statements.
E.
The JdbcTemplate generates SQL statements.
Answers
Suggested answer: B, E

Explanation:

Reference: https://www.baeldung.com/spring-jdbctemplate-in-list

Which statement defines a pointcut? (Choose the best answer.)

A.
A point in the execution of a program such as a method call or field assignment.
A.
A point in the execution of a program such as a method call or field assignment.
Answers
B.
An expression that selects one or more join points.
B.
An expression that selects one or more join points.
Answers
C.
A module that encapsulated advices.
C.
A module that encapsulated advices.
Answers
D.
Code to be executed at each selected join point.
D.
Code to be executed at each selected join point.
Answers
Suggested answer: B

Explanation:

Reference: https://www.baeldung.com/spring-aop-pointcut-tutorial

Which statement describes the propagation behavior of Propagation.REQUIRES_NEW annotation?

(Choose the best answer.)

A.
Starts a new transaction but throws an exception if an active transaction already exists.
A.
Starts a new transaction but throws an exception if an active transaction already exists.
Answers
B.
Joins a transaction if one already exists; throws an exception if an active transaction does not exist.
B.
Joins a transaction if one already exists; throws an exception if an active transaction does not exist.
Answers
C.
Starts a new transaction; if an active transaction already exists, it is suspended.
C.
Starts a new transaction; if an active transaction already exists, it is suspended.
Answers
D.
Runs in a nested transaction if an active transaction exists; throws an exception if an active transaction does not exist.
D.
Runs in a nested transaction if an active transaction exists; throws an exception if an active transaction does not exist.
Answers
Suggested answer: C

Explanation:

Reference: https://codete.com/blog/spring-transaction-propagation-modes

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

A.
Spring Data implementations exist for many data storage types, such as MongoDB, Neo4j, and Redis.
A.
Spring Data implementations exist for many data storage types, such as MongoDB, Neo4j, and Redis.
Answers
B.
Spring Data works by applying the JPA annotations to data stores such as MongoDB, Neo4j, and Redis.
B.
Spring Data works by applying the JPA annotations to data stores such as MongoDB, Neo4j, and Redis.
Answers
C.
Spring Data can greatly reduce the amount of “boilerplate” code typically needed for data access.
C.
Spring Data can greatly reduce the amount of “boilerplate” code typically needed for data access.
Answers
D.
Spring Data is specifically designed for JPA, JDBC, and relational database access only.
D.
Spring Data is specifically designed for JPA, JDBC, and relational database access only.
Answers
E.
Spring Data cannot be used together with Spring MVC.
E.
Spring Data cannot be used together with Spring MVC.
Answers
Suggested answer: C, D

Explanation:

Reference: https://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/repositories.html

Total 60 questions
Go to page: of 6