Free 2V0-72.22 Exam Braindumps (page: 2)

Page 1 of 16

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

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

Answer(s): A


Reference:

https://www.baeldung.com/spring-component-annotation



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

  1. @Value("#{daily.limit}")
  2. @Value("$(systemProperties.daily.limit)")
  3. @Value("$(daily.limit)")
  4. @Value("#{systemProperties[`daily.limit']}")
  5. @Value("#{systemProperties.daily.limit}")

Answer(s): B,D



Which two options are REST principles? (Choose two.)

  1. RESTful applications use a stateless architecture.
  2. RESTful application use HTTP headers and status codes as a contract with the clients.
  3. RESTful applications cannot use caching.
  4. RESTful application servers keep track of the client state.
  5. RESTful applications favor tight coupling between the clients and the servers.

Answer(s): A,B



Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)

  1. Mocking a Spring Bean requires annotating it with @MockBean annotation.
  2. If a Spring Bean already exists in the web slice test spring context, it cannot be mocked.
  3. Mocks cannot be used in a Spring Boot web slice test.
  4. Mocking a Spring Bean requires annotating it with @Mock annotation.

Answer(s): A


Reference:

https://tanzu.vmware.com/developer/guides/spring-boot-testing/






Post your Comments and Discuss VMware 2V0-72.22 exam with other Community members:

2V0-72.22 Discussions & Posts