basic-spring to master #5

Merged
hirst merged 9 commits from basic-spring into master 2024-05-27 17:32:47 +02:00
2 changed files with 3 additions and 16 deletions
Showing only changes of commit c02b24e766 - Show all commits

View file

@ -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) {

View file

@ -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();
}
}