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 111–120 of 192
You are configuring an ApplicationContext. What happens when a bean's scope is set to prototype?
-
A
One instance for each request
-
B
Singleton instance used everywhere
-
C
New instance every time requested
-
D
Same instance for all threads
Explanation
Prototype scope creates a new instance each time it's requested, differing from singleton scope.
Which service does Spring Cloud Config provide?
-
A
External configuration management
-
B
Database connection pooling
-
C
Microservice deployment orchestration
-
D
HTTP request logging
Explanation
Spring Cloud Config provides a central external configuration server.
A company needs to handle high-load web traffic dynamically. What Spring feature should they implement?
-
A
Spring Boot Actuator
-
B
Spring Data JPA
-
C
Spring Cloud Load Balancer
-
D
Spring Security
Explanation
Spring Cloud Load Balancer dynamically distributes traffic among instances.
You are configuring a Spring Bean with the @Scope annotation. What happens when using @Scope("prototype")?
-
A
Single instance is returned per request.
-
B
A new instance is created each time.
-
C
Shared instance across the application.
-
D
Singleton instance with dependency.
Explanation
@Scope("prototype") creates a new bean instance every time it is requested.
Which service provides distributed tracing in Spring applications?
-
A
Spring Cloud Sleuth
-
B
Spring Boot Actuator
-
C
Spring Data
-
D
Spring Security
Explanation
Spring Cloud Sleuth adds distributed tracing capabilities, while others serve different purposes.
A company needs to ensure failover for its Spring microservices. What should they implement?
-
A
Spring Cache
-
B
Circuit Breaker pattern
-
C
Spring Security
-
D
Aspect Oriented Programming
Explanation
The Circuit Breaker pattern enhances resilience, unlike the other options.
You are configuring a custom error page in a Spring Boot application. What files do you need to serve?
-
A
/error.html
-
B
/errors.html
-
C
/custom.html
-
D
/error/404.html
Explanation
/error.html is the standard path for custom error pages.
Which Spring Boot feature simplifies configuration management?
-
A
Spring Boot Profiles
-
B
Spring Data JPA
-
C
Spring MVC
-
D
Spring Cloud
Explanation
Spring Boot Profiles allow environment-specific configurations while the others serve different purposes.
A company needs to interact with a REST API securely; which Spring feature should they use?
-
A
RestTemplate
-
B
WebClient
-
C
HttpClient
-
D
TokenService
Explanation
WebClient is non-blocking and ideal for secure, modern REST interactions.
You are configuring a Spring application for session management; what happens when you set 'server.servlet.session.timeout' to 30 minutes?
-
A
Sessions expire after 30 mins of inactivity
-
B
Sessions last indefinitely
-
C
Sessions are created every 30 mins
-
D
Sessions time out immediately
Explanation
This setting defines user session inactivity before expiration, while the others do not accurately describe its behavior.