2019-05-30 10:21:56 +00:00
|
|
|
package ocean.gateway.service.routes;
|
|
|
|
|
|
|
|
import org.springframework.boot.SpringBootConfiguration;
|
|
|
|
import org.springframework.cloud.gateway.route.RouteLocator;
|
|
|
|
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
2019-05-30 16:54:30 +00:00
|
|
|
|
2019-05-30 10:21:56 +00:00
|
|
|
@SpringBootConfiguration
|
2019-05-30 16:54:30 +00:00
|
|
|
@Slf4j
|
2019-05-30 10:21:56 +00:00
|
|
|
public class Business {
|
|
|
|
@Bean
|
|
|
|
public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
|
|
|
|
log.warn("path_route");
|
|
|
|
return builder.routes().route("path_route", r -> r.path("/hello").uri("http://localhost:3030/hello")).build();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|