VMware Professional Develop VMware Spring 2V0-72.22 Exam Questions

Page: 1 / 14
Total 79 questions
Question 1

Which two statements are correct regarding the differences between @ConfigurationProperties and @Value? (Choose two.)



Answer : C, E

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.external-config.typesafe-configuration-properties.vs-value-annotation


Question 2

Which strategy is correct for configuring Spring Security to intercept particular URLs? (Choose the best answer.)



Answer : A

Spring Security provides a fluent API for configuring web security based on URL patterns and request matchers. The authorizeRequests() method returns an expression that allows specifying access rules for different URLs using methods such as antMatchers(), regexMatchers(), mvcMatchers(), etc. The order of these rules matters, as they are evaluated from top to bottom. Therefore, it is recommended to put the most specific rules first and the least specific ones last.


Question 3

Which two statements are true about REST? (Choose two.)



Answer : A, D


Question 4

Which two statements are true about Spring AOP? (Choose two.)



Answer : A, D


Question 5

In which three ways are Security filters used in Spring Security? (Choose three.)



Answer : B, D, E

Spring Security uses a filter-based architecture to provide security services for web applications. A filter is an object that intercepts HTTP requests and responses and performs some logic before or after the request is processed by the servlet. Spring Security provides a number of filters for different purposes, such as:

Authentication: Filters that handle the authentication process, such as UsernamePasswordAuthenticationFilter, BasicAuthenticationFilter, RememberMeAuthenticationFilter, etc.

User management: Filters that manage the user details and roles, such as SecurityContextPersistenceFilter, AnonymousAuthenticationFilter, ConcurrentSessionFilter, etc.

Logout: Filters that handle the logout process, such as LogoutFilter and SecurityContextLogoutHandler.

Authorization: Filters that enforce access control rules based on the user's authentication and roles, such as FilterSecurityInterceptor, ExceptionTranslationFilter, etc.


Question 6

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



Answer : C

Spring Boot provides a set of tools for improving the development experience, such as automatic restart, live reload, remote debugging, etc. These tools are included in the spring-boot-starter-devtools dependency, which can be added to the project's pom.xml or build.gradle file. The automatic restart feature will monitor the classpath for changes and trigger a restart of the application when necessary.


Question 7

Which two statements are true regarding a Spring Boot-based Spring MVC application? (Choose two.)



Answer : A, C

Spring Boot provides a convenient way to create Spring MVC applications with minimal configuration. By default, it uses Tomcat as the embedded servlet container, but it also supports other containers such as Jetty and Undertow. To use a different container, we just need to exclude the spring-boot-starter-tomcat dependency and include the corresponding starter for the desired container. For example, to use Undertow, we can add the following dependencies in our pom.xml:

<dependency> <groupId>org.springframework.boot</groupId> spring-boot-starter-web <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> spring-boot-starter-tomcat </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> spring-boot-starter-undertow </dependency>


Page:    1 / 14   
Total 79 questions