fix GatewayService
This commit is contained in:
parent
57f8f32730
commit
de49489f0a
1 changed files with 7 additions and 5 deletions
|
|
@ -289,8 +289,9 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
|||
String clearingSystem = StringUtils.isNotEmpty(gatewayApiSettings.getClearingSystem()) ?
|
||||
gatewayApiSettings.getClearingSystem() : "SPVB";
|
||||
request.setClearingSystem(clearingSystem);
|
||||
if (inboundServerSettings.getAllowedTypes().isEmpty() ||
|
||||
inboundServerSettings.getAllowedTypes().contains(request.getType())) {
|
||||
if (inboundServerSettings != null &&
|
||||
(inboundServerSettings.getAllowedTypes().isEmpty() ||
|
||||
inboundServerSettings.getAllowedTypes().contains(request.getType()))) {
|
||||
String url = formingInboundUrl(inboundServerSettings.getEnableSsl(),
|
||||
inboundServerSettings.getHost(),
|
||||
inboundServerSettings.getPort(),
|
||||
|
|
@ -298,8 +299,9 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
|||
exchange(request, url);
|
||||
}
|
||||
|
||||
if (inboundExternalServerSettings.getAllowedTypes().isEmpty() ||
|
||||
inboundExternalServerSettings.getAllowedTypes().contains(request.getType())) {
|
||||
if (inboundExternalServerSettings != null &&
|
||||
(inboundExternalServerSettings.getAllowedTypes().isEmpty() ||
|
||||
inboundExternalServerSettings.getAllowedTypes().contains(request.getType()))) {
|
||||
String url = formingInboundUrl(inboundExternalServerSettings.getEnableSsl(),
|
||||
inboundExternalServerSettings.getHost(),
|
||||
inboundExternalServerSettings.getPort(),
|
||||
|
|
@ -308,7 +310,7 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
|||
}
|
||||
}
|
||||
|
||||
private void exchange(OutboundRequest request, String url){
|
||||
private void exchange(OutboundRequest request, String url) {
|
||||
HttpEntity<OutboundRequest> r = makeDefaultRequest(request);
|
||||
ResponseEntity<SuccessResponse> response = restTemplate.exchange(url, HttpMethod.POST, r, SuccessResponse.class);
|
||||
SuccessResponse bodyResponse = response.getBody();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue