[Sep 06, 2022] Get Up-To-Date Real Exam Questions for 2V0-72.22 with New Materials
Updated 2V0-72.22 Certification Exam Sample Questions
NEW QUESTION 32
Refer to the exhibit.
Based on the default Spring behavior, choose the correct answer. (Choose the best answer.)
- A. Two AccountRepository beans will be instantiated as the accountRepository() method will be called two times.
- B. Many AccountRepository beans will be instantiated, depending how often accountRepository(), transferService() and accountService() are called.
- C. One AccountRepository bean will be instantiated since the default scope is singleton.
- D. Three AccountRepository beans will be instantiated as the accountRepository() method will be called three times.
Answer: B
NEW QUESTION 33
Which two statements are correct regarding Spring Boot auto-configuration customization? (Choose two.)
- A. Provide customized auto-configuration by subclassing the provided Spring Boot auto-configuration classes.
- B. Disable specific auto-configuration classes by using the exclude attribute on the
@EnableAutoConfiguation annotation. - C. Enable component scanning within auto-configuration classes to find necessary components.
- D. Control the order of auto-configuration classes applied with @AutoConfigureOrder.
- E. Use the @AutoConfigureAfter or @AutoConfigureBefore annotations to apply configuration in a specific order.
Answer: B,E
Explanation:
Section: (none)
Explanation
NEW QUESTION 34
Which two statements are true regarding a Spring Boot-based Spring MVC application? (Choose two.)
- A. The default port of the embedded servlet container is 8088.
- B. Spring Boot starts up an embedded servlet container by default.
- C. Jetty is the default servlet container.
- D. The default embedded servlet container can be replaced with Undertow.
- E. Spring MVC starts up an in-memory database by default.
Answer: B,C
NEW QUESTION 35
Which two statements are true about Spring Boot and Spring Data JPA? (Choose two.)
- A. Any kind of Hibernate property can be passed to Spring Data JPA like spring.jpa.properties.xxx.
- B. Embedded Databases (H2, HSQLDB, Derby) are not re-created during the startup.
- C. Scanning of JPA Entities can not be customized, the whole classpath is scanned.
- D. Spring Data JPA is the only implementation for relational databases.
- E. @EntityScan and spring.jpa.* properties can be used to customize Spring Data JPA.
Answer: B,D
NEW QUESTION 36
Which two statements are true regarding Spring Security? (Choose two.)
- A. It provides a strict implementation of the Java EE Security specification.
- B. In the authorization configuration, the usage of permitAll () allows bypassing Spring security completely.
- C. Authentication data can be accessed using a variety of different mechanisms, including databases and LDAP.
- D. Access control can be configured at the method level.
- E. A special Java Authentication and Authorization Service (JAAS) policy file needs to be configured.
Answer: B,D
NEW QUESTION 37
Which two statements are correct when @SpringBootApplication is annotated on a class? (Choose two.)
- A. Methods in the class annotated with @Bean will be ignored.
- B. It causes Spring Boot to enable auto-configuration by default.
- C. All other annotations on the class will be ignored.
- D. A separate ApplicationContext will be created for each class annotated with
- E. Component scanning will start from the package of the class.
Answer: B,D
Explanation:
@SpringBootApplication.
NEW QUESTION 38
Which two statements are true regarding bean creation? (Choose two.)
- A. A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.
- B. A Spring bean can be implicitly created by annotating the class with @Bean and using the component- scanner to scan its package.
- C. A Spring bean can be explicitly created by annotating methods or fields by @Autowired.
- D. A Spring bean can be explicitly created by annotating the class with @Autowired.
- E. A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package.
Answer: D,E
Explanation:
Reference:
https://howtodoinjava.com/spring-core/spring-beans-autowiring-concepts/
NEW QUESTION 39
Which two statements are correct regarding Spring Boot auto-configuration? (Choose two.)
- A. Auto-configuration uses @Conditional annotations to constrain when it should apply.
- B. Auto-configuration is applied before user-defined beans have been registered.
- C. Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.
- D. Auto-configuration could apply when a bean is missing but not when a bean is present.
- E. Auto-configuration could apply when a bean is present but not when a bean is missing.
Answer: B,E
NEW QUESTION 40
Refer to the exhibit.
It is a Java code fragment from a Spring application. Which statement is true with regard to the above example? (Choose the best answer.)
- A. This syntax is invalid because the result of the getBean() method call should be cast to ClientService.
- B. It will return a bean of the type ClientService regardless of its id or name.
- C. It will return a bean called ClientService regardless of its id or name.
- D. This syntax is invalid because the bean id must be specified as a method parameter.
Answer: B
NEW QUESTION 41
Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)
- A. A metric must be created with one or more tags.
- B. Timer measures both the number of timed events and the total time of all events timed.
- C. Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and DistributionSummary.
- D. An external monitoring system must be used with Actuator.
- E. The metrics endpoint /actuator/metrics is exposed over HTTP by default.
Answer: D,E
NEW QUESTION 42
Which two statements are true regarding Spring and Spring Boot Testing? (Choose two.)
- A. EasyMock is supported out of the box.
- B. Mockito spy is not supported in Spring Boot testing by default.
- C. Integration and slice testing are both supported.
- D. The spring-test dependency provides annotations such as @Mock and @MockBean.
- E. @SpringBootTest or @SpringJUnitConfig can be used for creating an ApplicationContext.
Answer: B,D
NEW QUESTION 43
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 is only one transaction because REQUIRES_NEW will use an active transaction if one already exists.
- B. An exception is thrown as another transaction cannot be started within an existing transaction.
- C. There is only one transaction initiated by update1() because the call to update2() does not go through the proxy.
- D. There are 2 transactions because REQUIRES_NEW always runs in a new transaction.
Answer: C
NEW QUESTION 44
Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)
- A. If a Spring Bean already exists in the web slice test spring context, it cannot be mocked.
- B. Mocking a Spring Bean requires annotating it with @MockBean annotation.
- C. Mocks cannot be used in a Spring Boot web slice test.
- D. Mocking a Spring Bean requires annotating it with @Mock annotation.
Answer: B
NEW QUESTION 45
Refer to the exhibit.
Which statement is true? (Choose the best answer.)
- A. CustomerRepository should be a class, not an interface.
- B. A class that implements CustomerRepository must be implemented and declared as a Spring Bean.
- C. JPA annotations are required on the Customer class to successfully use Spring Data JDBC.
- D. An implementation of this repository can be automatically generated by Spring Data JPA.
Answer: D
NEW QUESTION 46
Which following statements are true about Spring Data? (Choose two.)
- A. Spring Data works by applying the JPA annotations to data stores such as MongoDB, Neo4j, and Redis.
- 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 cannot be used together with Spring MVC.
- E. Spring Data is specifically designed for JPA, JDBC, and relational database access only.
Answer: C,E
NEW QUESTION 47
......
2V0-72.22 Study Guide Cover to Cover as Literally: https://www.lead1pass.com/VMware/2V0-72.22-practice-exam-dumps.html
Get Unlimited Access to 2V0-72.22 Certification Exam Cert Guide: https://drive.google.com/open?id=1ywh93RzDKTJdiGPG9OwYdulSAnuuTX28