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 161–170 of 192

Q161

A company needs to enhance security for their RESTful services. What Spring feature should they implement?

  • A Spring Boot Starter Data
  • B Spring Security
  • C Spring Actuator
  • D Spring Cloud
Explanation Spring Security provides comprehensive security features for RESTful services, while others serve different purposes.
Q162

You are configuring a Spring application to use an embedded database. What happens if it's configured incorrectly?

  • A Database fails to start
  • B Data gets stored in memory
  • C Application crashes on startup
  • D Configuration is ignored entirely
Explanation An incorrectly configured embedded database leads to startup failure, whereas the others don't directly cause the application to fail.
Q163

Which service in Spring handles dependency injection?

  • A Spring IoC Container
  • B Spring MVC
  • C Spring Batch
  • D Spring Security
Explanation The Spring IoC Container is responsible for dependency injection; the others serve different purposes.
Q164

A company needs to manage transactions across multiple data sources. Which Spring feature should they utilize?

  • A Spring Security
  • B Spring Batch
  • C Spring Transaction Management
  • D Spring WebFlux
Explanation Spring Transaction Management provides the necessary abstraction for managing transactions; the others don't handle transactions.
Q165

You are configuring a Spring Boot application with a profile 'dev'. What happens when you set spring.profiles.active=dev?

  • A Only 'dev' configuration applies
  • B No configuration is loaded
  • C Both 'dev' and 'default' apply
  • D 'dev' config is ignored
Explanation When 'dev' is active, both 'dev' and default configurations are applied, enhancing flexibility.
Q166

Which service allows you to manage application security in Spring?

  • A Spring Security
  • B Spring Cloud
  • C Spring Boot Actuator
  • D Spring Data JPA
Explanation Spring Security provides authentication and authorization features, while other options focus on different aspects of Spring applications.
Q167

A company needs to expose a REST API for its microservices. What is the best option to achieve this using Spring?

  • A Spring MVC
  • B Spring Batch
  • C Spring Integration
  • D Spring Session
Explanation Spring MVC is specifically designed for building web applications and exposing REST APIs, while others serve different roles.
Q168

You are configuring a Spring application with AOP. What happens when an aspect is applied with a pointcut expression matching all methods?

  • A All methods will be intercepted.
  • B Only public methods will be intercepted.
  • C No methods will be intercepted.
  • D Only private methods will be intercepted.
Explanation A pointcut expression matching all methods will intercept every method execution, while other options incorrectly restrict interception.
Q169

Which service would you use to manage application deployment pipelines in Spring?

  • A Spring Cloud Data Flow
  • B Spring Security
  • C Spring Batch
  • D Spring WebFlux
Explanation Spring Cloud Data Flow orchestrates data-driven microservices while other options do not handle deployment pipelines.
Q170

A company needs to simplify configuration management, which would be the best approach?

  • A Using @Value annotations
  • B Utilizing Spring Boot Profiles
  • C Storing configuration in Java files
  • D Hardcoding configuration values
Explanation Using Spring Boot Profiles allows environment-specific configuration while other options create complexity.