Guide (New 2023) Actual VMware 2V0-72.22 Exam Questions
2V0-72.22 Exam Dumps Pass with Updated 2023 Certified Exam Questions
NEW QUESTION # 34
Which two statements are true regarding Spring Boot Testing? (Choose two.)
- A. @SpringBootTest without any configuration classes expects there is only one class annotated with @SpringBootConfiguration in the application.
- B. @SpringBootTest is typically used for integration testing.
- C. Test methods annotated with @SpringBootTest will recreate the ApplicationContext.
- D. Test methods in a @SpringBootTest class are transactional by default.
- E. @TestApplicationContext is used to define additional beans or customizations for a test.
Answer: B,C
NEW QUESTION # 35
Which following statements are true about Spring Data? (Choose two.)
- A. Spring Data is specifically designed for JPA, JDBC, and relational database access only.
- B. Spring Data implementations exist for many data storage types, 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 works by applying the JPA annotations to data stores such as MongoDB, Neo4j, and Redis.
- E. Spring Data cannot be used together with Spring MVC.
Answer: A,C
NEW QUESTION # 36
Refer to the exhibit.
Assume that the application is using Spring transaction management which uses Spring AOP internally.
Choose the statement that describes what is happening when the update1 method is called? (Choose the best answer.)
- A. There are 2 transactions because REQUIRES_NEW always runs in a new transaction.
- B. There is only one transaction because REQUIRES_NEW will use an active transaction if one already exists.
- C. An exception is thrown as another transaction cannot be started within an existing transaction.
- D. There is only one transaction initiated by update1() because the call to update2() does not go through the proxy.
Answer: D
NEW QUESTION # 37
Refer to the exhibit.
What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)
- A. clientService (starting with lowercase "c")
- B. ClientService (starting with uppercase "C")
- C. clientServiceImpl (starting with uppercase "C")
- D. clientServiceImpl (starting with lowercase "c")
Answer: B
NEW QUESTION # 38
Which two statements are true about REST? (Choose two.)
- A. REST is Relative.
- B. REST is Stateful.
- C. REST is Interoperable.
- D. REST is Reliable.
- E. REST is a Protocol.
Answer: C,E
NEW QUESTION # 39
Which two statements about pointcut expressions are true? (Choose two.)
- A. A pointcut expression cannot specify the type of parameters.
- B. A pointcut expression cannot have a wildcard for a method name.
- C. A pointcut expression will throw an exception if no methods are matched.
- D. A pointcut expression can be used to select join points which have been annotated with a specific annotation.
- E. A pointcut expression can include operators such as the following: && (and), || (or), ! (not).
Answer: D,E
NEW QUESTION # 40
What two options are auto-configured Spring Boot Actuator HealthIndicators? (Choose two.)
- A. RabbitHealthIndicator
- B. GoogleCloudDataStoreHealthIndicator
- C. DataSourceHealthIndicator
- D. OktaHealthIndicator
- E. DynamoDBHealthIndicator
Answer: A,C
NEW QUESTION # 41
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. @Sql(alwaysCommit=true)
- C. @Commit
- D. @Transactional(commit=true)
- E. @Rollback(false)
Answer: C,E
NEW QUESTION # 42
Which two statements are true regarding Spring Security? (Choose two.)
- A. Authentication data can be accessed using a variety of different mechanisms, including databases and LDAP.
- B. A special Java Authentication and Authorization Service (JAAS) policy file needs to be configured.
- C. Access control can be configured at the method level.
- D. It provides a strict implementation of the Java EE Security specification.
- E. In the authorization configuration, the usage of permitAll () allows bypassing Spring security completely.
Answer: C,E
NEW QUESTION # 43
Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)
- A. Mocking a Spring Bean requires annotating it with @Mock annotation.
- B. If a Spring Bean already exists in the web slice test spring context, it cannot be mocked.
- C. Mocking a Spring Bean requires annotating it with @MockBean annotation.
- D. Mocks cannot be used in a Spring Boot web slice test.
Answer: C
NEW QUESTION # 44
Refer to the exhibit.
Which two statements are correct regarding the HelloAutoConfig auto-configuration class when it is specified in the META-INF/spring.factories file? (Choose two.)
- A. This auto-configuration class is used only when the HelloService.class is not on the classpath.
- B. A HelloService bean will be created from the helloService() method only when there is no other HelloService bean in the ApplicationContext.
- C. A HelloService bean will be created from the helloService() method and will replace existing a HelloService bean in the ApplicationContext.
- D. A HelloService bean will be created from the helloService() method even if the HelloService.class is not in the classpath.
- E. This auto-configuration class is used only when the HelloService.class is on the classpath.
Answer: B,E
NEW QUESTION # 45
Which statement defines a pointcut? (Choose the best answer.)
- A. Code to be executed at each selected join point.
- B. An expression that selects one or more join points.
- C. A module that encapsulated advices.
- D. A point in the execution of a program such as a method call or field assignment.
Answer: B
NEW QUESTION # 46
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.)
- A. spring-boot-starter-devtools
- B. spring-boot-initializr
- C. spring-boot-devtools
- D. spring-boot-restart
Answer: C
NEW QUESTION # 47
Which two statements are true regarding the RestTemplate class? (Choose two.)
- A. It provides convenience methods for writing REST clients.
- B. Sending an HTTP request with a custom header is not possible when using RestTemplate.
- C. It provides convenience methods for writing REST services.
- D. It automatically supports sending and receiving Java objects.
- E. It supports asynchronous non-blocking model.
Answer: B,D
NEW QUESTION # 48
Which two statements are correct when @SpringBootApplication is annotated on a class? (Choose two.)
- A. A separate ApplicationContext will be created for each class annotated with
- B. All other annotations on the class will be ignored.
- C. Component scanning will start from the package of the class.
- D. Methods in the class annotated with @Bean will be ignored.
- E. It causes Spring Boot to enable auto-configuration by default.
Answer: A,E
Explanation:
@SpringBootApplication.
NEW QUESTION # 49
Which three types of objects can be returned form a JdbcTemplate query? (Choose three.)
- A. JSONObject
- B. Properties
- C. Generic MapS
- D. User defined types
- E. XMLObject
- F. Simple types (int, long, String, etc)
Answer: B,D,F
NEW QUESTION # 50
Which two statements are true concerning constructor injection? (Choose two.)
- A. Field injection is preferred over constructor injection from a unit testing standpoint.
- B. Constructor injection is preferred over field injection to support unit testing.
- C. If there is only one constructor the @Autowired annotation is not required.
- D. Constructor injection only allows one value to be injected.
- E. Construction injection can be used with multiple constructors without @Autowired annotation.
Answer: A,B
NEW QUESTION # 51
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 explicitly created by annotating the class with @Autowired.
- 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 implicitly created by annotating the class with @Component and using the component-scanner to scan its package.
Answer: B,E
Explanation:
Reference:
https://howtodoinjava.com/spring-core/spring-beans-autowiring-concepts/
NEW QUESTION # 52
......
Pass Guaranteed Quiz 2023 Realistic Verified Free VMware: https://actual4test.practicetorrent.com/2V0-72.22-practice-exam-torrent.html