VMware 2v0-72-22 practice test

Professional Develop VMware Spring Exam

Last exam update: Dec 15 ,2024
Page 1 out of 4. Viewing questions 1-15 out of 60

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.
Mark Question:
Answer:

CD


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

User Votes:
A 2 votes
50%
B 1 votes
50%
C 4 votes
50%
D 2 votes
50%
E 1 votes
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

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.
Mark Question:
Answer:

C


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

User Votes:
A 1 votes
50%
B
50%
C 3 votes
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

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.
Mark Question:
Answer:

B


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

User Votes:
A 1 votes
50%
B 4 votes
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

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.
Mark Question:
Answer:

BE


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

User Votes:
A
50%
B 3 votes
50%
C 1 votes
50%
D 3 votes
50%
E 4 votes
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

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.
Mark Question:
Answer:

AB


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

User Votes:
A 3 votes
50%
B 4 votes
50%
C
50%
D
50%
E 1 votes
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

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.
Mark Question:
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/

User Votes:
A
50%
B 3 votes
50%
C
50%
D 2 votes
50%
E 1 votes
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

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.
Mark Question:
Answer:

CD


User Votes:
A
50%
B 1 votes
50%
C 2 votes
50%
D 2 votes
50%
E 1 votes
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

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.
Mark Question:
Answer:

AB


User Votes:
A 1 votes
50%
B 1 votes
50%
C 1 votes
50%
D 1 votes
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

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)
Mark Question:
Answer:

BC


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

User Votes:
A
50%
B 2 votes
50%
C 1 votes
50%
D 2 votes
50%
E 1 votes
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 10

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

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

AD


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

User Votes:
A 2 votes
50%
B
50%
C 1 votes
50%
D 1 votes
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 11

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.
  • B. The status with the least severity is used as the top-level status.
  • C. Custom status values can be created.
  • D. The built-in status values are DOWN, OUT_OF_SERVICE, UNKNOWN, and UP in decreasing order of severity.
  • E. The severity order cannot be changed due to security reasons.
Mark Question:
Answer:

CD


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

User Votes:
A 1 votes
50%
B
50%
C 2 votes
50%
D 1 votes
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 12

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

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

D


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

User Votes:
A
50%
B 1 votes
50%
C
50%
D 1 votes
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 13

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.
  • B. It is not enabled by default.
  • C. It can be used to display arbitrary application information.
  • D. It can be used to change a property value on a running application.
  • E. Typically it is used to display build or source control information.
Mark Question:
Answer:

BC


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

User Votes:
A 1 votes
50%
B 1 votes
50%
C 1 votes
50%
D
50%
E 1 votes
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 14

Refer to the exhibit.

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

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

C


User Votes:
A
50%
B
50%
C 2 votes
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 15

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.
  • B. The @AfterReturning advice allows behavior to be added after a method returns even if it throws an exception.
  • C. The advice has complete control over the method invocation; it could even prevent the method from being called at all.
  • D. Typically used to prevent any exception, thrown by the advised method, from propagating up the call-stack.
Mark Question:
Answer:

A


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

User Votes:
A 2 votes
50%
B 1 votes
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000
To page 2