Vmware

2V0-72.22 practice test

Practice with 15 free Testara sample questions, or choose paid access to the full 73-question bank.

Provider
Vmware
Question bank
73
Free sample
15 questions
Publisher
Testara

About this practice material

This page covers Testara's practice question bank for 2V0-72.22, a certification listed under Vmware. Questions use original, exam-style scenarios and are not questions from the official certification exam.

Testara is an independent practice platform and is not affiliated with, endorsed by, or authorized by Vmware. The certification credential is issued by Vmware, not Testara. Certification and provider names belong to their respective owners.

Start practicing

The guest demo does not save an attempt. Sign in before buying access.

Try 15 questions free

Available without signing in

Free sample questions

These 15 questions and their explanations are server-rendered so you can inspect the material before opening the interactive demo.

  1. Question 1 · 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.)

    Choose one answer.

    • Ensure a valid bean name in the @Component annotation is specified.
    • Ensure a valid @ComponentScan annotation in the Java configuration is specified.
    • Ensure a valid @Scope for the class is specified.
    • Ensure a valid @Bean for the class is specified.
  2. Question 2 · 1

    Given an ApplicationContext containing three bean definitions of type Foo with bean ids foo1, foo2, and foo3, which three @Autowired scenarios are valid and will allow the ApplicationContext to initialize successfully? (Choose three.)

    Choose all answers that apply.

    • @Autowired public void setFoo (Foo foo) {…}
    • @Autowired @Qualifier (“foo3”) Foo foo;
    • @Autowired public void setFoo (@Qualifier (“foo1”) Foo foo) {…}
    • @Autowired private Foo foo;
    • @Autowired private Foo foo2;
    • @Autowired public void setFoo(Foo foo2) {…}
  3. Question 3 · 1

    Which dependency enables an automatic restart of the application as code is changed during development of a Spring boot configuration on a web application? (Choose the best answer.)

    Choose one answer.

    • spring-boot-devtools
    • spring-boot-initializr
    • spring-boot-starter-devtools
    • spring-boot-restart
  4. Question 4 · 1

    Spring puts each bean instance in a scope. What is the default scope? (Choose the best answer.)

    Choose one answer.

    • prototype
    • singleton
    • request
    • session
  5. Question 5 · 1

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

    Choose one answer.

    Question illustration 1
    • Add @PathVariable(“id”) String accountId argument to the update() handler method.
    • Add @PathVariable long accountId argument to the update() handler method.
    • Add @RequestParam long accountId argument to the update() handler method.
    • Add @RequestParam(“id”) String accountId argument to the update() handler method.
  6. Question 6 · 1

    Which strategy is correct for configuring Spring Security to intercept particular URLs? (Choose the best answer.)

    Choose one answer.

    • The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the most specific rule first and the least specific last.
    • Spring Security can obtain URLs from Spring MVC controllers, the Spring Security configuration just needs a reference to the controller to be protected.
    • The URLs are specified in a special properties file, used by Spring Security.
    • The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the least specific rule first and the most specific last.
  7. Question 7 · 1

    In which three ways are Security filters used in Spring Security? (Choose three.)

    Choose all answers that apply.

    • To provide risk governance.
    • To drive authentication.
    • To manage application users.
    • To provide a logout capability.
    • To enforce authorization (access control).
    • To encrypt data.
  8. Question 8 · 1

    Refer to the exhibit. The above code shows a conditional @Bean method for the creation of a JdbcTemplate bean. Which two statements correctly describe the code behavior? (Choose two.)

    Choose all answers that apply.

    Question illustration 1
    • @ConditionalOnBean(name= “dataSource”) should be replaced with @ConditionalOnBean (DataSource.class) for greater flexibility.
    • @ConditionalOnBean(name= “dataSource”) should be replaced with @ConditionalOnMissingBean (DataSource.class) for greater flexibility.
    • The @Bean annotation should be removed.
    • A JdbcTemplate bean will be created when the DataSource class is in the classpath but there is no DataSource bean.
    • A JdbcTemplate bean will be created when a bean named dataSource has already been created.
  9. Question 9 · 1

    What is a Spring Boot starter dependency? (Choose the best answer.)

    Choose one answer.

    • A setting for specifying which code you want Spring Boot to generate for you.
    • A specific POM which you must build to control Spring Boot’s opinionated runtime.
    • A pre-existing model project you can download and use as the basis of your project.
    • An easy way to include multiple, coordinated dependencies related to a specific technology, like web or JDBC.
  10. Question 10 · 1

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

    Choose all answers that apply.

    • Add @EnableTransactionManagement to a Java configuration class.
    • Annotate a class, an interface, or individual methods requiring a transaction with the @Transactional annotation.
    • A class must be annotated with @Service and @Transaction.
    • A class requiring a transaction must implement the TransactionInterceptor interface.
    • Write a Spring AOP advice to implement transactional behavior.
  11. Question 11 · 1

    Which two statements are true regarding the RestTemplate class? (Choose two.)

    Choose all answers that apply.

    • It supports asynchronous non-blocking model.
    • It automatically supports sending and receiving Java objects.
    • It provides convenience methods for writing REST clients.
    • It provides convenience methods for writing REST services.
    • Sending an HTTP request with a custom header is not possible when using RestTemplate.
  12. Question 12 · 1

    Which two options will inject the value of the daily.limit system property? (Choose two.)

    Choose all answers that apply.

    • @Value(“#{daily.limit}”)
    • @Value(“$(systemProperties.daily.limit)”)
    • @Value(“$(daily.limit)”)
    • @Value(“#{systemProperties[‘daily.limit’]}”)
    • @Value(“#{systemProperties.daily.limit}”)
  13. Question 13 · 1

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

    Choose one answer.

    • @ActiveProfiles is a class-level annotation that is used to instruct the Spring TestContext Framework to record all application events that are published in the ApplicationContext during the execution of a single test.
    • @ActiveProfiles is a class-level annotation that you can use to configure how the Spring TestContext Framework is bootstrapped.
    • @ActiveProfiles is a class-level annotation that you can use to configure the locations of properties files and inlined properties to be added to the set of PropertySources in the Environment for an ApplicationContext loaded for an integration test.
    • @ActiveProfiles is a class-level annotation that is used to declare which bean definition profiles should be active when loaded an ApplicationContext for an integration test.
  14. Question 14 · 1

    Which two statements are true about REST? (Choose two.)

    Choose all answers that apply.

    • REST is a Protocol.
    • REST is Stateful.
    • REST is Reliable.
    • REST is Interoperable.
    • REST is Relative.
  15. Question 15 · 1

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

    Choose one answer.

    • A *.properties file matching the name of the class annotated with @SpringBootApplication.
    • config.properties or config.yml, usually located in the classpath root.
    • application.properties or application.yml, usually located in the classpath root.
    • env.properties or env.yml, usually located in the classpath root.

Each purchase applies to this certification. Prices are one-time payments, not monthly subscriptions.

Starter

$29 USD one time

Full access to one certification's question bank in standard practice mode for 60 days.

  • Full question bank for one certification
  • 60 days of access
  • Standard practice mode
  • Question notes and community discussions
  • Attempt scores and answer review

Professional

$49 USD one time

Full access to one certification's question bank, custom test controls and advanced analytics for 60 days.

  • Custom test builder
  • Timers and question selection
  • Randomized question and answer order
  • Advanced performance and weak-question analytics
  • Priority customer support
Try 15 questions free