- splitted account deletion to 2 separate endpoints: /api/customers/{customerId}/toaccounts/{accountId} and /api/accounts/{accountId}
- simplified the tests - cleared the code
This commit is contained in:
@@ -5,9 +5,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by popikyardo on 15.01.16.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "api.gateway")
|
||||
public class ApiGatewayProperties {
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* Created by popikyardo on 15.01.16.
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
@EnableAutoConfiguration
|
||||
|
||||
@@ -2,9 +2,6 @@ package net.chrisrichardson.eventstore.javaexamples.banking.apigateway;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
/**
|
||||
* Created by popikyardo on 07.12.15.
|
||||
*/
|
||||
public class RestUtil {
|
||||
|
||||
public static boolean isError(HttpStatus status) {
|
||||
|
||||
@@ -33,9 +33,6 @@ import java.util.stream.Stream;
|
||||
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.*;
|
||||
|
||||
/**
|
||||
* Created by popikyardo on 15.01.16.
|
||||
*/
|
||||
@RestController
|
||||
public class GatewayController {
|
||||
|
||||
|
||||
@@ -10,9 +10,6 @@ import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by popikyardo on 21.01.16.
|
||||
*/
|
||||
public class ContentRequestTransformer extends ProxyRequestTransformer {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,9 +8,6 @@ import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Enumeration;
|
||||
|
||||
/**
|
||||
* Created by popikyardo on 21.01.16.
|
||||
*/
|
||||
public class HeadersRequestTransformer extends ProxyRequestTransformer {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,9 +7,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
/**
|
||||
* Created by popikyardo on 21.01.16.
|
||||
*/
|
||||
public abstract class ProxyRequestTransformer {
|
||||
|
||||
protected ProxyRequestTransformer predecessor;
|
||||
|
||||
@@ -9,9 +9,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
/**
|
||||
* Created by popikyardo on 21.01.16.
|
||||
*/
|
||||
public class URLRequestTransformer extends ProxyRequestTransformer {
|
||||
|
||||
private ApiGatewayProperties apiGatewayProperties;
|
||||
|
||||
@@ -25,4 +25,7 @@ api.gateway.endpoints[5].method=POST
|
||||
api.gateway.endpoints[5].location=http://${transfers.commandside.service.host}:8080
|
||||
api.gateway.endpoints[6].path=[/]*api/customers.*
|
||||
api.gateway.endpoints[6].method=DELETE
|
||||
api.gateway.endpoints[6].location=http://${customers.commandside.service.host}:8080
|
||||
api.gateway.endpoints[6].location=http://${customers.commandside.service.host}:8080\
|
||||
api.gateway.endpoints[7].path=[/]*api/accounts.*
|
||||
api.gateway.endpoints[7].method=DELETE
|
||||
api.gateway.endpoints[7].location=http://${accounts.commandside.service.host}:8080
|
||||
Reference in New Issue
Block a user