VMware

Spring Professional Develop

2V0-72.22

Prepare for the 2V0-72.22 exam to validate your skills in Spring Professional development.

192 questions 0 views Free
Start Mock Test Timed · Full-length · Scored

Questions 141–150 of 192

Q141

You are configuring Spring Security. What happens if you omit the role assignments to user accounts?

  • A All users assume admin access
  • B No access is granted
  • C Users can access public resources
  • D Only guest access is allowed
Explanation Without role assignments, users can access publicly accessible resources, unlike the implications for admin, no access, or guest roles.
Q142

Which service provides a standardized way to manage application configurations in Spring?

  • A Spring Cloud Config
  • B Spring Data
  • C Spring Boot Actuator
  • D Spring Security
Explanation Spring Cloud Config standardizes application configuration management while the others serve different purposes.
Q143

A company needs to intercept requests and responses in a Spring application. Which mechanism should they use?

  • A Aspect-Oriented Programming
  • B Filter
  • C Interceptor
  • D Controller
Explanation Interceptors specifically manage requests and responses, while filters operate at a lower level.
Q144

You are configuring a Spring Boot application to connect to a MySQL database. What property must be correctly set in application.properties?

  • A spring.datasource.url
  • B spring.datasource.driver-class-name
  • C spring.datasource.username
  • D spring.mysql.url
Explanation The property spring.datasource.url specifies the database connection URL, while the others are either insufficient or wrong.
Q145

Which service provides API management capabilities in Spring?

  • A Spring Cloud Gateway
  • B Spring Data JPA
  • C Spring Batch
  • D Spring Security
Explanation Spring Cloud Gateway is specifically designed for API management, unlike the others.
Q146

A company needs to store user sessions in a distributed application. Which repository type should be used?

  • A In-memory repository
  • B Database repository
  • C File-based repository
  • D Redis repository
Explanation Redis is optimal for distributed sessions due to its speed and distributed nature.
Q147

You are configuring a Spring Boot application with multiple profiles. What happens if a property is defined in both 'dev' and 'test' profiles?

  • A 'dev' properties override 'test' properties
  • B 'test' properties override 'dev' properties
  • C Both are merged into one property
  • D Configuration fails due to conflict
Explanation Properties defined in 'dev' will take precedence over 'test' properties.
Q148

Which service is primarily responsible for managing Spring application configuration?

  • A Spring Cloud Config
  • B Spring Webflux
  • C Spring Data JPA
  • D Spring Security
Explanation Spring Cloud Config provides centralized configuration management, while the others serve different purposes.
Q149

A company needs to deploy a highly available microservice using Spring Boot. Which pattern should they consider implementing?

  • A Monolithic architecture
  • B Circuit breaker pattern
  • C Service locator pattern
  • D Singleton pattern
Explanation The circuit breaker pattern enhances reliability by preventing cascading failures, unlike monolithic or other patterns.
Q150

You are configuring Spring Security for your application. What happens when you disable CSRF protection?

  • A Increased web application vulnerabilities
  • B Improved API performance
  • C Enhanced data encryption
  • D No impact on security
Explanation Disabling CSRF protection opens your application to cross-site request forgery attacks, while the other options do not accurately reflect the impact.