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
Questions 31–40 of 192
Which service helps manage microservices in Spring applications?
-
A
Spring Cloud Kubernetes
-
B
Spring Data JPA
-
C
Spring Security
-
D
Spring Batch
Explanation
Spring Cloud Kubernetes enables Kubernetes-native microservice management, while the others serve different purposes.
A company needs to validate an incoming request's parameters. Which Spring feature should they use?
-
A
@RequestMapping
-
B
@ModelAttribute
-
C
@Valid
-
D
@ResponseBody
Explanation
@Valid is specifically used for parameter validation, unlike the others which serve different roles.
You are configuring a Spring Boot application. What happens when you set server.port to 0?
-
A
Service will not start
-
B
Random free port will be used
-
C
Error on startup
-
D
Service uses default port
Explanation
Setting server.port to 0 allows the system to select a random free port.
Which Spring framework component handles the application's database interactions?
-
A
Spring Data
-
B
Spring MVC
-
C
Spring Security
-
D
Spring AOP
Explanation
Spring Data provides tools for data access and manipulation; the others serve different purposes.
A company needs to send the same message to multiple services. Which pattern should they use?
-
A
Broker Pattern
-
B
Adapter Pattern
-
C
Observer Pattern
-
D
Chain of Responsibility
Explanation
The Broker Pattern allows asynchronous communication between multiple services, while the others do not fit this requirement.
You are configuring a Spring Boot application. What happens when you leave the application.properties file empty?
-
A
Default configurations will be applied
-
B
Application fails to start
-
C
Application runs with exceptions
-
D
Custom configurations are ignored
Explanation
Spring Boot provides sensible defaults if no properties are defined; the other options suggest undesired behavior.
Which service is primarily used for managing application lifecycle in Spring?
-
A
Spring Boot
-
B
Spring Data
-
C
Spring Security
-
D
Spring Cloud
Explanation
Spring Boot provides tools to manage application lifecycle; the others focus on different aspects.
A company needs to ensure its application can have different configurations for production and development. What should they use?
-
A
Profiles
-
B
Beans
-
C
Aspect-Oriented Programming
-
D
Filters
Explanation
Profiles allow the application to group configurations; Beans alone do not manage environments.
You are configuring a REST API with Spring MVC. What happens when you omit @ResponseBody in your controller method?
-
A
Method returns JSON automatically
-
B
Method returns a view name
-
C
Unsuccessful API call
-
D
API call requires authentication
Explanation
Without @ResponseBody, the method returns a view name instead of a JSON response.
Which service is primarily used to deploy microservices in Spring?
-
A
Spring Cloud
-
B
Spring Batch
-
C
Spring Data
-
D
Spring MVC
Explanation
Spring Cloud focuses on building microservices, while others serve different purposes.