2V0-72.22 Professional Develop VMware Spring

Loading demo links...

Showing 7–9 of 10 questions

Question 7

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

Select an option, then click Submit answer.

  • Used to designate the location of the application.properties file in a Spring Boot application.

  • Used to easily look up and return a single property value from some external property file.

  • Used to designate the file directory of the application.properties file in a Spring Boot application.

  • Used to add a set of name/value pairs to the Spring Environment from an external source.

Question 8

Refer to the exhibit.

Graphical user interface, text, application, email Description automatically generated

Based on the default Spring behavior, choose the correct answer. (Choose the best answer.)

Select an option, then click Submit answer.

  • One AccountRepository bean will be instantiated since the default scope is singleton.

  • Three AccountRepository beans will be instantiated as the accountRepository() method will be called three times.

  • Many AccountRepository beans will be instantiated, depending how often accountRepository(), transferService() and accountService() are called.

  • Two AccountRepository beans will be instantiated as the accountRepository() method will be called two times.

Question 9

Refer to the exhibit.

Text Description automatically generated

How can a response status code be set for No Content (204)? (Choose the best answer.)

Select an option, then click Submit answer.

  • Annotate the update() handler method with @PutMapping(“/store/orders/{id”}”, HttpStatus.NO_CONTENT).

  • Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).

  • Annotate the update() handler method with @ResponseEntity(204).

  • The update() handler method cannot return a void type, it must return a ResponseEntity type.