Download Professional Develop VMware Spring.2V0-72.22.VCEplus.2022-06-07.30q.vcex

Vendor: VMware
Exam Code: 2V0-72.22
Exam Name: Professional Develop VMware Spring
Date: Jun 07, 2022
File Size: 215 KB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Purchase
Coupon: EXAM_HUB

Discount: 20%

Demo Questions

Question 1
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.
Correct answer: A
Explanation:
Reference: https://www.baeldung.com/spring-component-annotation
Reference: https://www.baeldung.com/spring-component-annotation
Question 2
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}")
Correct answer: BD
Question 3
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.
Correct answer: AB
Question 4
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. 
Correct answer: A
Explanation:
Reference: https://tanzu.vmware.com/developer/guides/spring-boot-testing/
Reference: https://tanzu.vmware.com/developer/guides/spring-boot-testing/
Question 5
Which two statements are true regarding Spring Security? (Choose two.)
  1. Access control can be configured at the method level.
  2. A special Java Authentication and Authorization Service (JAAS) policy file needs to be configured.
  3. Authentication data can be accessed using a variety of different mechanisms, including databases and LDAP.
  4. In the authorization configuration, the usage of permitAll () allows bypassing Spring security completely.
  5. It provides a strict implementation of the Java EE Security specification.
Correct answer: AD
Explanation:
Reference: https://www.baeldung.com/security-none-filters-none-access-permitAll
Reference: https://www.baeldung.com/security-none-filters-none-access-permitAll
Question 6
Which two statements are true regarding a Spring Boot-based Spring MVC application? (Choose two.)
  1. The default embedded servlet container can be replaced with Undertow. 
  2. Jetty is the default servlet container.
  3. Spring Boot starts up an embedded servlet container by default.
  4. The default port of the embedded servlet container is 8088.
  5. Spring MVC starts up an in-memory database by default.
Correct answer: BC
Explanation:
Reference: https://www.javatpoint.com/spring-vs-spring-boot-vs-spring-mvc
Reference: https://www.javatpoint.com/spring-vs-spring-boot-vs-spring-mvc
Question 7
Which two statements are true regarding Spring and Spring Boot Testing? (Choose two.)
  1. EasyMock is supported out of the box.
  2. @SpringBootTest or @SpringJUnitConfig can be used for creating an ApplicationContext.
  3. Mockito spy is not supported in Spring Boot testing by default.
  4. The spring-test dependency provides annotations such as @Mock and @MockBean.
  5. Integration and slice testing are both supported.
Correct answer: CD
Explanation:
Reference: https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/html/boot-features-testing.html 
Reference: https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/html/boot-features-testing.html 
Question 8
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.)
  1. There are 2 transactions because REQUIRES_NEW always runs in a new transaction.
  2. An exception is thrown as another transaction cannot be started within an existing transaction.
  3. There is only one transaction because REQUIRES_NEW will use an active transaction if one already exists.
  4. There is only one transaction initiated by update1() because the call to update2() does not go through the proxy.
Correct answer: D
Question 9
Which two statements are true concerning constructor injection? (Choose two.) 
  1. If there is only one constructor the @Autowired annotation is not required.
  2. Constructor injection only allows one value to be injected.
  3. Constructor injection is preferred over field injection to support unit testing.
  4. Construction injection can be used with multiple constructors without @Autowired annotation.
  5. Field injection is preferred over constructor injection from a unit testing standpoint.
Correct answer: CE
Question 10
Given an ApplicationContext containing three bean definitions of type Foo with bean ids foo1, foo2, and foo3, which three @Autowired scenarios are valid and will allow the ApplicationContext to initialize successfully? (Choose three.)
  1. @Autowired public void setFoo (Foo foo) {...}
  2. @Autowired @Qualifier ("foo3") Foo foo;
  3. @Autowired public void setFoo (@Qualifier ("foo1") Foo foo) {...}
  4. @Autowired private Foo foo;
  5. @Autowired private Foo foo2;
  6. @Autowired public void setFoo(Foo foo2) {...}
Correct answer: ADF
Explanation:
 
 
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!