Intermediate Spring Boot API Gateway with Zuul
Test your knowledge on implementing and configuring API Gateway using Spring Boot and Zuul.
Questions in this quiz
12 questions on Intermediate Spring Boot API Gateway with Zuul. Work through them here, then start the quiz to answer them and see your score.
1.What is the primary purpose of using Zuul in a Spring Boot application?
- ATo handle database transactions
- BTo perform data caching
- CTo manage application logging
- DTo serve as an API Gateway
2.Which dependency is essential to include in your Spring Boot project to enable Zuul?
- Aspring-cloud-starter-zuul
- Bspring-boot-starter-web
- Cspring-cloud-starter-netflix-eureka-client
- Dspring-boot-starter-data-jpa
3.How do you enable Zuul in a Spring Boot application?
- AAdd @EnableDiscoveryClient annotation
- BAdd @EnableEurekaClient annotation
- CAdd @EnableCircuitBreaker annotation
- DAdd @EnableZuulProxy annotation
4.Which property is used in application.properties to define a custom route in Zuul?
- Azuul.routes.<route>.path
- Bzuul.routes.<route>.url
- Czuul.routes.<route>.stripPrefix
- Dzuul.routes.<route>.serviceId
5.What is the default port on which a Spring Boot application with Zuul runs?
- A8888
- B8761
- C9090
- D8080
6.How can you disable a specific route in Zuul?
- ARemove the route from application.properties
- BSet zuul.routes.<route>.disable=true
- CSet zuul.routes.<route>.active=false
- DSet zuul.routes.<route>.enabled=false
7.Which Zuul filter type is used for request pre-processing?
- APost
- BRoute
- CError
- DPre
8.How do you specify a service ID for a route in Zuul?
- Azuul.routes.<route>.serviceId
- Bzuul.routes.<route>.service
- Czuul.routes.<route>.name
- Dzuul.routes.<route>.id
9.What is the role of the 'stripPrefix' property in Zuul routing?
- ATo remove the prefix from the request URL before forwarding
- BTo change the prefix of the response URL
- CTo add a prefix to the request URL before forwarding
- DTo log the request URL without prefix
10.Which Zuul filter type is used for handling errors during request processing?
- ARoute
- BPre
- CError
- DPost
11.How can you enable CORS for a specific route in Zuul?
- AEnable CORS globally in application.properties
- BSet zuul.routes.<route>.cors=true
- CConfigure CORS in the service behind the route
- DUse a CORS filter in Zuul
12.Which property would you use to set a global timeout for all routes in Zuul?
- Azuul.routes.<route>.timeout
- Bhystrix.command.default.execution.isolation.thread.timeoutInMilliseconds
- Czuul.routes.timeout
- Dzuul.timeout.global