2V0-72.22 Practice Test

2V0-72.22 Practice Test practice questions, page 3 of 4, with answer review and explanations.

Question 11

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.)

  1. spring-boot-devtools
  2. spring-boot-initializr
  3. spring-boot-starter-devtools
  4. spring-boot-restart

Question 12

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

  1. prototype
  2. singleton
  3. request
  4. session

Question 13

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

  1. Add @PathVariable(“id”) String accountId argument to the update() handler method.
  2. Add @PathVariable long accountId argument to the update() handler method.
  3. Add @RequestParam long accountId argument to the update() handler method.
  4. Add @RequestParam(“id”) String accountId argument to the update() handler method.

Question 14

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

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

Question 15

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

  1. To provide risk governance.
  2. To drive authentication.
  3. To manage application users.
  4. To provide a logout capability.
  5. To enforce authorization (access control).
  6. To encrypt data.