January 2018
Intermediate to advanced
414 pages
10h 29m
English
Now that we have our Gateway running, we can use it to route to our services. Let's first enable just adding the @EnableZuulProxy annotation in our Chapter06GatewayApplication class:
package com.microservices.chapter06gatewayimport org.springframework.boot.autoconfigure.SpringBootApplicationimport org.springframework.boot.runApplicationimport org.springframework.cloud.netflix.zuul.EnableZuulProxy@SpringBootApplication@EnableZuulProxyclass Chapter06GatewayApplicationfun main(args: Array<String>) { runApplication<Chapter06GatewayApplication>(*args)}
If we restart our Gateway, we can use the http://localhost:8080/greetings/greetings URL, and we get the following as an output:
secret message
How does this actually work? Here's ...
Read now
Unlock full access