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 81–90 of 192
You are configuring a RestController. What happens when @ResponseBody is omitted?
-
A
Response body is not serialized
-
B
Response is automatically serialized
-
C
Endpoint will not work at all
-
D
Only XML output is produced
Explanation
Omitting @ResponseBody prevents serialization of the response body.
Which service is used to manage application dependencies in Spring apps?
-
A
Spring Cloud
-
B
Spring Boot Starter
-
C
Spring Data
-
D
Spring Framework
Explanation
Spring Boot Starter simplifies dependency management, unlike the other services which serve different purposes.
A company needs to manage multiple microservices. What should they implement?
-
A
Single monolith application
-
B
Load balancer
-
C
Service registry
-
D
Database clustering
Explanation
A service registry is essential for microservices, while the other options don’t facilitate service discovery.
You are configuring a Spring application with multiple profiles. What will happen if no profile is specified?
-
A
Default profile will be used
-
B
It will throw an error
-
C
Application will run in dev mode
-
D
Only the last loaded profile applies
Explanation
Without a specified profile, the application defaults to the 'default' profile, unlike the incorrect options.
Which service provides a platform for building, deploying, and managing microservices with Spring?
-
A
Spring Cloud
-
B
Spring Data
-
C
Spring Boot
-
D
Spring MVC
Explanation
Spring Cloud specializes in services for microservices architecture, while others focus on different areas of application development.
A company needs to secure their Spring Boot application. What should they implement first?
-
A
SSL certificates
-
B
Basic authentication
-
C
Spring Security
-
D
API Gateway
Explanation
Spring Security is designed specifically for securing Spring applications, making it the best first step.
You are configuring a Spring Boot application. What happens when you change the `@ComponentScan` base package?
-
A
Only components in the new package are scanned.
-
B
All components are scanned, ignoring old package.
-
C
Only beans in the old package remain active.
-
D
Application will fail to start.
Explanation
Changing `@ComponentScan` affects which components get detected, limiting the scan to the specified package only.
You are configuring Spring Security for an application. Which component is responsible for user authentication?
-
A
AuthenticationManager
-
B
AuthorizationService
-
C
UserDetailsService
-
D
SecurityContextHolder
Explanation
AuthenticationManager is the component that handles the authentication process, while the others serve different roles.
A company needs to implement an API gateway in their Spring Cloud architecture. Which Spring Cloud component should they use?
-
A
Spring Cloud Config
-
B
Spring Cloud Gateway
-
C
Spring Cloud Eureka
-
D
Spring Cloud Circuit Breaker
Explanation
Spring Cloud Gateway is specifically designed for API gateway functionalities, unlike the other options.
What happens when Spring Boot fails to find default properties in 'application.properties'?
-
A
Application fails to start.
-
B
Application uses built-in defaults.
-
C
Application prompts for input.
-
D
Application starts with security disabled.
Explanation
Spring Boot will default to built-in values when properties are missing, contrary to the other options.