- 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:
dartpopikyardo
2016-09-20 03:55:44 +03:00
parent fe925ac14a
commit 0f21a057b0
56 changed files with 228 additions and 374 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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;

View File

@@ -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;

View File

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