Download Professional Develop VMware Spring.2V0-72.22.VCEplus.2024-07-31.52q.tqb

Vendor: VMware
Exam Code: 2V0-72.22
Exam Name: Professional Develop VMware Spring
Date: Jul 31, 2024
File Size: 939 KB

How to open TQB files?

Files with TQB (Taurus Question Bank) extension can be opened by Taurus Exam Studio.

Demo Questions

Question 1
In which three ways are Security filters used in Spring Security? (Choose three.)
  1. To provide risk governance.
  2. To drive authentication.
  3. To manage application users.
  4. To provide a logout capability.
  5. To enforce authorization (access control).
  6. To encrypt data.
Correct answer: BDE
Explanation:
Reference: https://www.javadevjournal.com/spring-security/spring-security-filters/
Reference: https://www.javadevjournal.com/spring-security/spring-security-filters/
Question 2
Refer to the exhibit.
  
 
The above code shows a conditional @Bean method for the creation of a JdbcTemplate bean. Which two statements correctly describe the code behavior? (Choose two.)
  1. @ConditionalOnBean(name= "dataSource") should be replaced with @ConditionalOnBean(DataSource.class) for greater flexibility.
  2. @ConditionalOnBean(name= "dataSource") should be replaced with@ConditionalOnMissingBean (DataSource.class) for greater flexibility.
  3. The @Bean annotation should be removed.
  4. A JdbcTemplate bean will be created when the DataSource class is in the classpath but there is no DataSource bean.
  5. A JdbcTemplate bean will be created when a bean named dataSource has already been created.
Correct answer: AD
Question 3
What is a Spring Boot starter dependency? (Choose the best answer.)
  1. A setting for specifying which code you want Spring Boot to generate for you.
  2. A specific POM which you must build to control Spring Boot's opinionated runtime.
  3. A pre-existing model project you can download and use as the basis of your project.
  4. An easy way to include multiple, coordinated dependencies related to a specific technology, like web or JDBC.
Correct answer: D
Explanation:
Reference: https://developer.ibm.com/tutorials/j-spring-boot-basics-perry/
Reference: https://developer.ibm.com/tutorials/j-spring-boot-basics-perry/
Question 4
Which two are required to use transactions in Spring? (Choose two.)
  1. Add @EnableTransactionManagement to a Java configuration class.
  2. Annotate a class, an interface, or individual methods requiring a transaction with the @Transactional annotation.
  3. A class must be annotated with @Service and @Transaction.
  4. A class requiring a transaction must implement the TransactionInterceptor interface.
  5. Write a Spring AOP advice to implement transactional behavior.
Correct answer: AB
Explanation:
Reference: https://www.baeldung.com/transaction-configuration-with-jpa-and-spring
Reference: https://www.baeldung.com/transaction-configuration-with-jpa-and-spring
Question 5
Which two statements are true regarding the RestTemplate class? (Choose two.)
  1. It supports asynchronous non-blocking model. 
  2. It automatically supports sending and receiving Java objects.
  3. It provides convenience methods for writing REST clients.
  4. It provides convenience methods for writing REST services.
  5. Sending an HTTP request with a custom header is not possible when using RestTemplate.
Correct answer: BE
Explanation:
Reference: https://docs.spring.io/spring-framework/docs/current/javadocapi/org/springframework/web/client/RestTemplate.html
Reference: https://docs.spring.io/spring-framework/docs/current/javadocapi/org/springframework/web/client/RestTemplate.html
Question 6
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 7
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 8
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 9
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 10
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
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX FILES

Use ProfExam Simulator to open VCEX files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

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

Get Now!