diff --git a/src/main/java/ocean/gateway/service/ServiceApplication.java b/src/main/java/ocean/gateway/service/ServiceApplication.java index 0e0b313..fcb87cf 100644 --- a/src/main/java/ocean/gateway/service/ServiceApplication.java +++ b/src/main/java/ocean/gateway/service/ServiceApplication.java @@ -2,9 +2,11 @@ package ocean.gateway.service; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; @SpringBootApplication(scanBasePackages = {"ocean.gateway.service.*"}) +@ComponentScan public class ServiceApplication { public static void main(String[] args) { SpringApplication.run(ServiceApplication.class, args); diff --git a/src/main/java/ocean/gateway/service/filters/TokenFilter.java b/src/main/java/ocean/gateway/service/filters/TokenFilter.java new file mode 100644 index 0000000..371d8df --- /dev/null +++ b/src/main/java/ocean/gateway/service/filters/TokenFilter.java @@ -0,0 +1,28 @@ +package ocean.gateway.service.filters; + +import org.springframework.boot.SpringBootConfiguration; +import org.springframework.cloud.gateway.filter.GatewayFilterChain; +import org.springframework.cloud.gateway.filter.GlobalFilter; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; +import org.springframework.web.server.ServerWebExchange; + +import reactor.core.publisher.Mono; + + +@Component +@Order(0) +public class TokenFilter implements GlobalFilter { + + public TokenFilter() { + } + + @Override + public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { + return null; + } + + + + +} \ No newline at end of file diff --git a/src/main/java/ocean/gateway/service/routes/Business.java b/src/main/java/ocean/gateway/service/routes/Business.java index ed7c258..26d375e 100644 --- a/src/main/java/ocean/gateway/service/routes/Business.java +++ b/src/main/java/ocean/gateway/service/routes/Business.java @@ -7,8 +7,9 @@ import org.springframework.context.annotation.Bean; import lombok.extern.slf4j.Slf4j; -@Slf4j + @SpringBootConfiguration +@Slf4j public class Business { @Bean public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {