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 121–130 of 192
Which service does Spring Cloud provide for distributed configuration management?
-
A
Config Server
-
B
Service Registry
-
C
Eureka Server
-
D
API Gateway
Explanation
Config Server allows external configuration management, while the others serve different purposes.
You are configuring a REST API with Spring. Which annotation is essential for mapping GET requests?
-
A
@PostMapping
-
B
@GetMapping
-
C
@ResponseBody
-
D
@PathVariable
Explanation
@GetMapping specifically maps HTTP GET requests, unlike the other options.
What happens when a Spring Bean is marked as @Scope("prototype")?
-
A
Singleton instances are shared
-
B
New instances are created each time
-
C
Only one instance exists
-
D
Same instance across sessions
Explanation
Prototype scope means a new bean instance is created on each request, unlike the singleton scope.
Which service enables cloud-native application development in Spring?
-
A
Spring Cloud
-
B
Spring Boot
-
C
Spring Data
-
D
Spring AOP
Explanation
Spring Cloud provides tools for building distributed systems, whereas others focus on specific development aspects.
A company needs to handle asynchronous processing in a Spring application. Which component should they use?
-
A
@Scheduled
-
B
ExecutorService
-
C
Spring Batch
-
D
@Async
Explanation
@Async allows methods to run asynchronously while others are blocking.
You are configuring Spring Security with JWT. What happens when the token is expired?
-
A
Access is denied immediately
-
B
Refresh token is issued
-
C
New access token is generated
-
D
User sessions are invalidated
Explanation
Expired tokens typically result in access denial; no automatic token refresh occurs.
Which Spring feature allows for easy REST API creation?
-
A
Spring Web
-
B
Spring Batch
-
C
Spring Data
-
D
Spring Security
Explanation
Spring Web provides the tools for creating REST APIs, while others serve different purposes.
A company needs to manage multiple versions of their microservices. What Spring Cloud feature should they use?
-
A
Service Discovery
-
B
API Gateway
-
C
Circuit Breaker
-
D
Config Server
Explanation
Config Server manages application configurations, including multiple versions.
You are configuring Spring Security. What happens if you disable CSRF protection?
-
A
Increases security risk
-
B
Enables AJAX requests
-
C
Disables API access
-
D
Improves session management
Explanation
Disabling CSRF protection makes the application vulnerable to cross-site request forgery attacks.
Which service manages the dependency injection?
-
A
Spring Framework
-
B
Spring Boot
-
C
Spring Cloud
-
D
Spring Data
Explanation
The Spring Framework provides core dependency injection features, while the others focus on different aspects.