VMware Spring Professional Develop (Spring Cloud) — Questions and Answers
Question 1: PCI-DSS Requirement 10 mandates tracking and monitoring all access to network resources. In Spring Cloud, which combination best satisfies this?
- Feign client interceptors only
- Spring Cloud Sleuth distributed tracing + centralized log aggregation (ELK) (Correct answer)
- Spring Cloud Config + Vault
- Spring Boot DevTools + H2 console
Correct answer: Spring Cloud Sleuth distributed tracing + centralized log aggregation (ELK)
Spring Cloud Sleuth adds trace/span IDs to all service calls, and centralized log aggregation enables complete access monitoring required by PCI-DSS Requirement 10.
Question 2: What is the consequence of non-compliance for Spring Cloud professionals?
- Only verbal warnings
- Potential fines, license revocation, legal liability, and reputational damage (Correct answer)
- No significant consequences
- Just additional paperwork
Correct answer: Potential fines, license revocation, legal liability, and reputational damage
This is fundamental to Spring Cloud practice. Potential fines, license revocation, legal liability, and reputational damage represents the professional standard for regulatory in the Spring Cloud certification framework.
Question 3: A product owner wants to know what fallback behavior Spring Cloud Resilience4j provides when a circuit is OPEN. What should the developer implement?
- Spring retries the call indefinitely until success
- The service blocks the thread until the circuit closes
- Resilience4j restarts the downstream service automatically
- A fallback method or Fallback Factory returns a default response instead of calling the failing service (Correct answer)
Correct answer: A fallback method or Fallback Factory returns a default response instead of calling the failing service
When the circuit is OPEN, Resilience4j invokes a configured fallback method or factory that returns a safe default, preventing calls to the failing downstream service.
Question 4: Which property disables Eureka registration for a Spring Boot service during local development?
- eureka.client.register-with-eureka=false (Correct answer)
- eureka.client.fetch-registry=false
- eureka.server.enabled=false
- spring.cloud.discovery.enabled=false
Correct answer: eureka.client.register-with-eureka=false
Setting eureka.client.register-with-eureka=false prevents the service from registering itself with the Eureka server.
Question 5: In Spring Cloud Gateway, which built-in filter adds a request rate limiting capability to protect downstream services?
- QuotaFilter
- RequestRateLimiter GatewayFilter (Correct answer)
- ThrottleGatewayFilter
- RateLimit GatewayFilter
Correct answer: RequestRateLimiter GatewayFilter
The RequestRateLimiter GatewayFilter factory in Spring Cloud Gateway uses a backend (e.g., Redis) to enforce rate limits on incoming requests per key.
Question 6: Which Spring Cloud circuit breaker implementation is based on Resilience4j?
- Spring Cloud CircuitBreaker with Resilience4j (Correct answer)
- Spring Cloud Retry
- Spring Cloud Hystrix
- Spring Cloud Fault Tolerance
Correct answer: Spring Cloud CircuitBreaker with Resilience4j
Spring Cloud CircuitBreaker provides an abstraction with a Resilience4j implementation, replacing the deprecated Netflix Hystrix circuit breaker.
Question 7: What HTTP status code does a Spring Cloud health check endpoint return when a service is UP and healthy?
- 200 OK (Correct answer)
- 202 Accepted
- 201 Created
- 204 No Content
Correct answer: 200 OK
Spring Boot Actuator's /actuator/health endpoint returns HTTP 200 OK with a JSON body containing status UP when the application is healthy.
Question 8: In Spring Cloud Gateway, what is a 'Predicate' used for?
- Balancing load across downstream service instances
- Performing authentication and authorization checks
- Matching incoming requests to determine which route to apply (Correct answer)
- Modifying the request or response headers
Correct answer: Matching incoming requests to determine which route to apply
Predicates in Spring Cloud Gateway are conditions evaluated against incoming requests (path, headers, method, etc.) to determine if a route matches.
Question 9: What is the default load balancing algorithm used by Spring Cloud LoadBalancer?
- Least connections
- Weighted round-robin
- Random selection
- Round-robin (Correct answer)
Correct answer: Round-robin
Spring Cloud LoadBalancer uses round-robin as its default algorithm, cycling through available service instances in order.
Question 10: Which Spring Cloud starter dependency integrates Resilience4j as the circuit breaker implementation for Spring Boot 3 projects?
- spring-cloud-starter-circuitbreaker-resilience4j (Correct answer)
- resilience4j-spring-cloud
- spring-boot-starter-resilience4j
- spring-cloud-resilience4j-starter
Correct answer: spring-cloud-starter-circuitbreaker-resilience4j
The spring-cloud-starter-circuitbreaker-resilience4j dependency provides Spring Cloud's Circuit Breaker abstraction backed by Resilience4j.
Question 11: How should Spring Cloud professionals handle conflicts with stakeholders?
- Address issues professionally through active listening, finding common ground, and seeking resolution (Correct answer)
- Avoid all conflict
- Escalate immediately to management
- Ignore stakeholder concerns
Correct answer: Address issues professionally through active listening, finding common ground, and seeking resolution
This is fundamental to Spring Cloud practice. Address issues professionally through active listening, finding common ground, and seeking resolution represents the professional standard for communication in the Spring Cloud certification framework.
Question 12: Which Spring Cloud Gateway predicate routes requests where the path matches `/api/orders/**`?
- Route=/api/orders/**
- Path=/api/orders/** (Correct answer)
- Match=/api/orders/**
- PathVariable=/api/orders/**
Correct answer: Path=/api/orders/**
The Path predicate factory in Spring Cloud Gateway routes requests whose URI path matches the specified Ant-style pattern.
Question 13: How does Spring Cloud Kubernetes perform service discovery within a Kubernetes cluster?
- It deploys its own Eureka server inside the cluster
- It queries the Kubernetes API server for Services and Endpoints (Correct answer)
- It uses DNS-SD records published by CoreDNS
- It reads environment variables injected by the kubelet
Correct answer: It queries the Kubernetes API server for Services and Endpoints
Spring Cloud Kubernetes uses the Kubernetes API server to discover services and their endpoints, enabling native Kubernetes-based service discovery.
Question 14: Which Spring Cloud project provides service discovery support using HashiCorp Consul?
- Spring Cloud Zookeeper
- Spring Cloud Kubernetes
- Spring Cloud Consul (Correct answer)
- Spring Cloud Netflix
Correct answer: Spring Cloud Consul
Spring Cloud Consul integrates with HashiCorp Consul for service discovery, distributed configuration, and health checking.
Question 15: In Spring Cloud Config, what HTTP endpoint is used to trigger a configuration refresh on a specific service instance?
- /actuator/refresh (Correct answer)
- /spring/refresh
- /config/reload
- /actuator/restart
Correct answer: /actuator/refresh
POSTing to /actuator/refresh causes the application context to re-bind @ConfigurationProperties and @Value fields from the config server.
Question 16: What annotation is used to enable a Spring Boot application to act as a Eureka Server?
- @EnableEurekaServer (Correct answer)
- @EnableServiceRegistry
- @EnableDiscoveryClient
- @EnableEurekaClient
Correct answer: @EnableEurekaServer
@EnableEurekaServer placed on the main application class activates the Eureka Server auto-configuration.
Question 17: What is the purpose of the `spring.application.name` property in a Spring Cloud microservice?
- Acts as the service ID used for registration and discovery (Correct answer)
- Sets the JVM process name
- Defines the HTTP server port
- Configures the log file name
Correct answer: Acts as the service ID used for registration and discovery
spring.application.name serves as the virtual hostname and service ID under which the application registers with the discovery server.
Question 18: Which library replaced Hystrix as the recommended circuit breaker in Spring Cloud after Netflix put Hystrix in maintenance mode?
- Sentinel
- Istio
- Resilience4j (Correct answer)
- Envoy
Correct answer: Resilience4j
Resilience4j became the recommended circuit breaker library in Spring Cloud after Netflix officially put Hystrix into maintenance mode.
Question 19: What is the function of the `CircuitBreakerGatewayFilter` in Spring Cloud Gateway?
- It blocks traffic when the gateway CPU exceeds 90%
- It tracks error rates per route and adjusts routing weights dynamically
- It wraps downstream calls with a circuit breaker to handle failures and trigger fallbacks (Correct answer)
- It monitors gateway memory and restarts when it exceeds a threshold
Correct answer: It wraps downstream calls with a circuit breaker to handle failures and trigger fallbacks
The CircuitBreakerGatewayFilter integrates a circuit breaker (e.g., Resilience4j) into the gateway routing pipeline, enabling fallback URIs when downstream services fail.
Question 20: Evidence from chaos engineering experiments on Spring Cloud applications shows that which experiment most reliably exposes hidden single points of failure?
- Killing the lowest-traffic service instance
- Rebooting the build server during peak hours
- Enabling debug logging on all services during peak traffic
- Injecting network latency between a high-fan-out service and all its downstream dependencies simultaneously (Correct answer)
Correct answer: Injecting network latency between a high-fan-out service and all its downstream dependencies simultaneously
Simultaneously degrading all dependencies of a high-fan-out service reveals whether timeout budgets, fallbacks, and circuit breakers collectively prevent user-visible failure.
Question 21: When does a Resilience4j circuit breaker enter the Half-Open state?
- During initial circuit breaker startup
- After the waitDurationInOpenState has elapsed while the circuit is Open (Correct answer)
- When exactly 50% of requests are failing
- When the fallback method is partially active
Correct answer: After the waitDurationInOpenState has elapsed while the circuit is Open
After waiting in Open state for waitDurationInOpenState duration, the circuit breaker transitions to Half-Open to allow probe calls and test if the downstream service has recovered.
Question 22: A team deploys Config Server with encryption enabled. A downstream service receives a raw {cipher}... value and cannot decrypt it. What is the most likely cause?
- The service is missing spring.cloud.config.decrypt=false
- Eureka is not propagating the encryption key to service instances
- The Git backend does not support encrypted values
- Config Server-side decryption is disabled or misconfigured, so the client receives raw cipher text it cannot decrypt (Correct answer)
Correct answer: Config Server-side decryption is disabled or misconfigured, so the client receives raw cipher text it cannot decrypt
By default Config Server decrypts values before sending them; if spring.cloud.config.server.encrypt.enabled=false is set or the key is misconfigured, clients receive raw cipher text they can't decrypt.
Question 23: Which Spring Cloud Config Server backend stores configuration in a relational database rather than Git?
- Database backend (spring.cloud.config.server.db)
- SQL backend (spring.cloud.config.server.sql)
- RDBMS backend (spring.cloud.config.server.rdbms)
- JDBC backend (spring.cloud.config.server.jdbc) (Correct answer)
Correct answer: JDBC backend (spring.cloud.config.server.jdbc)
The JDBC backend allows Config Server to store and retrieve configuration from a relational database using a PROPERTIES table, configured via spring.cloud.config.server.jdbc.
Question 24: What does the `@LoadBalanced` annotation do when applied to a RestTemplate bean in Spring Cloud?
- Intercepts requests to resolve logical service names via the discovery client (Correct answer)
- Enables connection pooling for HTTP connections
- Adds retry logic on HTTP 5xx responses
- Enables circuit breaking on all requests
Correct answer: Intercepts requests to resolve logical service names via the discovery client
@LoadBalanced marks a RestTemplate so that a LoadBalancerInterceptor is applied, translating service names like http://my-service/api into real IP/port using the discovery client.
Question 25: What does the 'slidingWindowSize' property control in a Resilience4j circuit breaker configuration?
- The timeout duration for each individual request
- The number of recent calls analyzed to calculate the failure rate (Correct answer)
- The maximum size of the thread pool
- The interval between retry attempts
Correct answer: The number of recent calls analyzed to calculate the failure rate
slidingWindowSize defines how many recent calls (COUNT_BASED) or seconds (TIME_BASED) are used to calculate the failure rate for circuit breaker decisions.
Question 26: What is the purpose of the 'permittedNumberOfCallsInHalfOpenState' property in Resilience4j?
- It controls the number of retry attempts in degraded mode
- It limits request concurrency while the circuit initializes
- It defines how many probe calls are allowed through when the circuit is testing recovery in Half-Open state (Correct answer)
- It sets the maximum thread count during service recovery
Correct answer: It defines how many probe calls are allowed through when the circuit is testing recovery in Half-Open state
permittedNumberOfCallsInHalfOpenState controls how many test requests are sent through in Half-Open state to determine if the downstream service has recovered.
Question 27: What are the three states a circuit breaker cycles through in the circuit breaker pattern?
- Running, Stopped, Paused
- Active, Inactive, Pending
- Closed, Open, Half-Open (Correct answer)
- Enabled, Disabled, Testing
Correct answer: Closed, Open, Half-Open
A circuit breaker transitions between Closed (normal operation), Open (rejecting calls after failures), and Half-Open (testing recovery) states.
Question 28: How does Resilience4j support sharing a base configuration across multiple circuit breaker instances?
- By extending a parent Spring bean definition
- By importing a shared YAML anchor into each instance block
- By using separate Spring profiles per circuit breaker instance
- By defining a 'default' configuration that other instances inherit via the baseConfig property (Correct answer)
Correct answer: By defining a 'default' configuration that other instances inherit via the baseConfig property
Resilience4j supports a 'default' configuration entry; other instances reference it with baseConfig: default to inherit its settings and override only specific properties.
Question 29: In Eureka's self-preservation mode, what triggers the server to stop evicting instances?
- Network latency exceeds 500ms
- More than 10 instances are registered
- CPU usage exceeds 80%
- Received heartbeats fall below the expected threshold (Correct answer)
Correct answer: Received heartbeats fall below the expected threshold
Eureka activates self-preservation mode when the percentage of received heartbeats drops below the expected threshold, preventing mass eviction during network partitions.
Question 30: What is the purpose of a 'Filter' in Spring Cloud Gateway?
- Discovering available routes from the service registry
- Selecting which downstream instance receives a request
- Modifying the incoming request or outgoing response before/after routing (Correct answer)
- Caching responses from downstream services
Correct answer: Modifying the incoming request or outgoing response before/after routing
Filters in Spring Cloud Gateway can inspect and modify HTTP requests and responses, enabling cross-cutting concerns like authentication, logging, and header manipulation.
Question 31: What does the @RateLimiter annotation control when applied to a method in Resilience4j?
- The speed of database read operations
- The network bandwidth consumed per request
- The CPU utilization threshold per service instance
- The number of calls allowed within a configured time window (Correct answer)
Correct answer: The number of calls allowed within a configured time window
@RateLimiter restricts how many calls can be made to the annotated method within a defined time period, preventing downstream overload.
Question 32: What is the purpose of the `RewritePath` filter in Spring Cloud Gateway?
- Converts query parameters to path variables
- Rewrites HTTP headers to match downstream service expectations
- Transforms the request URI path using a regex pattern before forwarding (Correct answer)
- Rewrites the hostname of the downstream service URL
Correct answer: Transforms the request URI path using a regex pattern before forwarding
The RewritePath filter uses a regex replacement to transform the incoming request path into a new path before the request is forwarded to the downstream service.
VMware Spring Professional Develop (Spring Cloud)
Validates expertise in Spring Cloud microservices development, covering service discovery, API gateway routing, circuit breaker resilience patterns, and distributed configuration management using the Spring ecosystem.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds