diff --git a/gateway/src/main/java/com/learningpulse/gateway/GatewayApplication.java b/gateway/src/main/java/com/learningpulse/gateway/GatewayApplication.java index 511cf50..bb4e61d 100644 --- a/gateway/src/main/java/com/learningpulse/gateway/GatewayApplication.java +++ b/gateway/src/main/java/com/learningpulse/gateway/GatewayApplication.java @@ -3,10 +3,11 @@ package com.learningpulse.gateway; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; - -@EnableDiscoveryClient @SpringBootApplication +@EnableWebFluxSecurity +@EnableDiscoveryClient public class GatewayApplication { public static void main(String[] args) { diff --git a/gateway/src/main/java/com/learningpulse/gateway/SimpleGateway.java b/gateway/src/main/java/com/learningpulse/gateway/SimpleGateway.java deleted file mode 100644 index c68fc03..0000000 --- a/gateway/src/main/java/com/learningpulse/gateway/SimpleGateway.java +++ /dev/null @@ -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 getRoute() { - return route().GET("/get", http("https://httpbin.org")).build(); - } -}