VMware 2v0-72-22 practice test

Professional Develop VMware Spring Exam


Question 1

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.
  • 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.
Answer:

CD

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

Discussions
0 / 600

Question 2

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.
  • B. Joins a transaction if one already exists; throws an exception if an active transaction does not exist.
  • C. Starts a new transaction; if an active transaction already exists, it is suspended.
  • D. Runs in a nested transaction if an active transaction exists; throws an exception if an active transaction does not exist.
Answer:

C

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

Discussions
0 / 600

Question 3

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.
  • B. An expression that selects one or more join points.
  • C. A module that encapsulated advices.
  • D. Code to be executed at each selected join point.
Answer:

B

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

Discussions
0 / 600

Question 4

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

  • 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.
Answer:

BE

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

Discussions
0 / 600

Question 5

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

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

AB

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

Discussions
0 / 600

Question 6

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.
  • B. A Spring bean can be implicitly created by annotating the class with @Component 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.
  • D. A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.
  • E. A Spring bean can be explicitly created by annotating the class with @Autowired.
Answer:

BE

Explanation:
Reference:
https://docs.spring.io/spring-framework/docs/3.0.0.M4/spring-framework-reference/html/ch03s10.html
https://howtodoinjava.com/spring-core/spring-beans-autowiring-concepts/

Discussions
0 / 600

Question 7

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

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

CD

Discussions
0 / 600

Question 8

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

  • 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.
Answer:

AB

Discussions
0 / 600

Question 9

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)
  • B. @Rollback(false)
  • C. @Commit
  • D. @Sql(alwaysCommit=true)
  • E. @Transactional(commit=true)
Answer:

BC

Explanation:
Reference:
https://stackoverflow.com/questions/9817388/junit-tests-always-rollback-the-
transactions

Discussions
0 / 600

Question 10

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

  • A. DataSourceHealthIndicator
  • B. GoogleCloudDataStoreHealthIndicator
  • C. DynamoDBHealthIndicator
  • D. RabbitHealthIndicator
  • E. OktaHealthIndicator
Answer:

AD

Explanation:
Reference:
https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/production-ready-endpoints.html

Discussions
0 / 600
To page 2