Merge pull request #8360 from rozagerardo/rozagerardo/BAEL-3313_writing-custom-spring-cloud-gateway-filters--package-rearrange
[BAEL-3313] spring-cloud/spring-cloud-gateway | Writing custom Spring Cloud Gateway Filters - rearrange packages
This commit is contained in:
commit
d80152c450
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.config;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.filters.factories;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.factories;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.filters.factories;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.factories;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.filters.factories;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.factories;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.filters.factories;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.factories;
|
||||
|
||||
import java.util.Optional;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.filters.global;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.global;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.filters.global;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.global;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.filters.global;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.global;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
|
@ -1,11 +1,11 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.routes;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.routes;
|
||||
|
||||
import org.springframework.cloud.gateway.route.RouteLocator;
|
||||
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import com.baeldung.springcloudgateway.customfilters.filters.factories.LoggingGatewayFilterFactory;
|
||||
import com.baeldung.springcloudgateway.customfilters.filters.factories.LoggingGatewayFilterFactory.Config;
|
||||
import com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.factories.LoggingGatewayFilterFactory;
|
||||
import com.baeldung.springcloudgateway.customfilters.gatewayapp.filters.factories.LoggingGatewayFilterFactory.Config;
|
||||
|
||||
/**
|
||||
* Note: We want to keep this as an example of configuring a Route with a custom filter
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.secondservice;
|
||||
package com.baeldung.springcloudgateway.customfilters.secondservice;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.secondservice.web;
|
||||
package com.baeldung.springcloudgateway.customfilters.secondservice.web;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.service;
|
||||
package com.baeldung.springcloudgateway.customfilters.service;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.service.web;
|
||||
package com.baeldung.springcloudgateway.customfilters.service.web;
|
||||
|
||||
import java.util.Locale;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
@ -11,7 +11,7 @@ import org.springframework.boot.web.server.LocalServerPort;
|
|||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
import org.springframework.test.web.reactive.server.WebTestClient.ResponseSpec;
|
||||
|
||||
import com.baeldung.springcloudgateway.customfilters.utils.LoggerListAppender;
|
||||
import com.baeldung.springcloudgateway.customfilters.gatewayapp.utils.LoggerListAppender;
|
||||
|
||||
import ch.qos.logback.classic.spi.ILoggingEvent;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.springcloudgateway.customfilters.utils;
|
||||
package com.baeldung.springcloudgateway.customfilters.gatewayapp.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,11 +1,11 @@
|
|||
package com.baeldung.secondservice;
|
||||
package com.baeldung.springcloudgateway.customfilters.secondservice;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
|
||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
|
||||
import com.baeldung.secondservice.web.SecondServiceRestController;
|
||||
import com.baeldung.springcloudgateway.customfilters.secondservice.web.SecondServiceRestController;
|
||||
|
||||
@WebFluxTest(SecondServiceRestController.class)
|
||||
public class SecondServiceIntegrationTest {
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.secondservice;
|
||||
package com.baeldung.springcloudgateway.customfilters.secondservice;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.service;
|
||||
package com.baeldung.springcloudgateway.customfilters.service;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -6,7 +6,7 @@ import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
|
|||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
|
||||
import com.baeldung.service.web.ServiceRestController;
|
||||
import com.baeldung.springcloudgateway.customfilters.service.web.ServiceRestController;
|
||||
|
||||
@WebFluxTest(ServiceRestController.class)
|
||||
public class ServiceIntegrationTest {
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.service;
|
||||
package com.baeldung.springcloudgateway.customfilters.service;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appender name="LISTAPPENDER"
|
||||
class="com.baeldung.springcloudgateway.customfilters.utils.LoggerListAppender">
|
||||
class="com.baeldung.springcloudgateway.customfilters.gatewayapp.utils.LoggerListAppender">
|
||||
</appender>
|
||||
<root level="info">
|
||||
<appender-ref ref="LISTAPPENDER" />
|
||||
|
|
Loading…
Reference in New Issue