I am trying to use Zuul within my Spring Boot project.
application.properties
server.context-path=/${spring.application.name}
zuul.routes.engine.path=/api/engine/**
zuul.routes.engine.url=${engine.url}
GET
requests are working; however, Zuul is not forwarding my POST
requests. I'm not seeing any of the debug output for either the GET
or POST
listed here: How To Use.
How do I enable DEBUG
logging mode for Zuul?
Creating Zuul Server Application The Zuul Server is bundled with Spring Cloud dependency. You can download the Spring Boot project from Spring Initializer page https://start.spring.io/ and choose the Zuul Server dependency. Add the @EnableZuulProxy annotation on your main Spring Boot application.
So zuul route uses same serviceId ( card-service ). The service name is correct because it is the same in card-service app bootstrap.yml : spring: application: name: card-service. I use direct access to card-service by: http://localhost:59496/card-service/api/cards.
Zuul is built to enable dynamic routing, monitoring, resiliency, and security. It can also route the requests to multiple Amazon Auto Scaling Groups. For Example, /api/products are mapped to the product service and /api/user is mapped to the user service.
Set the property zuul.debug.request=true
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With