gateway actually works
This commit is contained in:
parent
8e3bba298f
commit
c02b24e766
|
@ -3,10 +3,11 @@ package com.learningpulse.gateway;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||||
|
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
|
||||||
|
|
||||||
|
|
||||||
@EnableDiscoveryClient
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
@EnableWebFluxSecurity
|
||||||
|
@EnableDiscoveryClient
|
||||||
public class GatewayApplication {
|
public class GatewayApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.learningpulse.gateway;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.web.servlet.function.RouterFunction;
|
|
||||||
import org.springframework.web.servlet.function.ServerResponse;
|
|
||||||
|
|
||||||
import static org.springframework.web.servlet.function.RouterFunctions.route;
|
|
||||||
import static org.springframework.cloud.gateway.server.mvc.handler.HandlerFunctions.http;
|
|
||||||
|
|
||||||
public class SimpleGateway {
|
|
||||||
@Bean
|
|
||||||
public RouterFunction<ServerResponse> getRoute() {
|
|
||||||
return route().GET("/get", http("https://httpbin.org")).build();
|
|
||||||
}
|
|
||||||
}
|
|
Reference in a new issue