From a9744f9de772b76ae86335a387922c87a45f54a9 Mon Sep 17 00:00:00 2001 From: Peyman <46522754+Marchosiax@users.noreply.github.com> Date: Sun, 19 Dec 2021 18:38:24 +0330 Subject: [PATCH 1/2] remove payment from enginx config (#170) --- Deployment/nginx.conf | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Deployment/nginx.conf b/Deployment/nginx.conf index dd8491f4a..ef1e81ebe 100644 --- a/Deployment/nginx.conf +++ b/Deployment/nginx.conf @@ -31,10 +31,6 @@ http { server websocket:8097; } - upstream docker-payment { - server payment:9995; - } - proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -82,11 +78,6 @@ http { rewrite ^/storage/(.*)$ /$1 break; } - location /payment { - proxy_pass http://docker-payment; - rewrite ^/payment(.*)$ $1 break; - } - location /stream { proxy_pass http://docker-websocket; # WS config From 0e1f637a1e684399e990fd65f242c685e8477f90 Mon Sep 17 00:00:00 2001 From: maryarm Date: Wed, 19 Jan 2022 12:54:40 +0100 Subject: [PATCH 2/2] #174: All modules except keycloak-gateway upgraded. --- .../src/main/resources/application.yml | 1 + .../accountant-ports/accountant-wallet-proxy/pom.xml | 4 ---- api/api-app/src/main/resources/application.yml | 1 + .../opex/api/core/spi/BlockchainGatewayProxy.kt | 2 +- api/api-ports/api-binance-rest/pom.xml | 4 ---- .../api/ports/binance/controller/WalletController.kt | 2 +- .../binance/proxy/BlockchainGatewayProxyImpl.kt | 4 ++-- bc-gateway/bc-gateway-app/pom.xml | 4 ---- .../src/main/resources/application-docker.yml | 5 ----- .../src/main/resources/application.yml | 5 +++++ bc-gateway/bc-gateway-core/pom.xml | 3 ++- .../core/service/ChainSyncServiceImplTest.kt | 2 +- .../eventlog-app/src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 1 + .../ports/kafka/listener/config/OrderKafkaConfig.kt | 4 ++-- matching-gateway/matching-gateway-app/pom.xml | 4 ---- .../src/main/resources/application-docker.yml | 5 ----- .../src/main/resources/application.yml | 5 +++-- pom.xml | 12 ++++-------- storage/storage-app/pom.xml | 9 +++++---- .../src/main/resources/application-docker.yml | 8 -------- user-management/keycloak-gateway/pom.xml | 2 -- user-management/pom.xml | 5 +++++ wallet/wallet-app/pom.xml | 11 +++++------ wallet/wallet-app/src/main/resources/application.yml | 1 + websocket/websocket-app/pom.xml | 4 ---- .../src/main/resources/application-docker.yml | 5 ----- .../websocket-app/src/main/resources/application.yml | 1 + .../kafka/listener/config/WebSocketKafkaConfig.kt | 4 ++-- 29 files changed, 45 insertions(+), 75 deletions(-) diff --git a/accountant/accountant-app/src/main/resources/application.yml b/accountant/accountant-app/src/main/resources/application.yml index eb96dcbd9..0f55f14e7 100644 --- a/accountant/accountant-app/src/main/resources/application.yml +++ b/accountant/accountant-app/src/main/resources/application.yml @@ -8,6 +8,7 @@ spring: name: opex-accountant main: allow-bean-definition-overriding: false + allow-circular-references: true kafka: bootstrap-servers: 192.168.178.29:9092 consumer: diff --git a/accountant/accountant-ports/accountant-wallet-proxy/pom.xml b/accountant/accountant-ports/accountant-wallet-proxy/pom.xml index 14c9cf7ea..a426e9a29 100644 --- a/accountant/accountant-ports/accountant-wallet-proxy/pom.xml +++ b/accountant/accountant-ports/accountant-wallet-proxy/pom.xml @@ -15,10 +15,6 @@ accountant-wallet-proxy Opex wallet proxy - - 2020.0.2 - - org.jetbrains.kotlin diff --git a/api/api-app/src/main/resources/application.yml b/api/api-app/src/main/resources/application.yml index d2e031949..18b0ec091 100644 --- a/api/api-app/src/main/resources/application.yml +++ b/api/api-app/src/main/resources/application.yml @@ -8,6 +8,7 @@ spring: name: opex-api main: allow-bean-definition-overriding: false + allow-circular-references: true kafka: bootstrap-servers: 192.168.178.29:9092 consumer: diff --git a/api/api-core/src/main/kotlin/co/nilin/opex/api/core/spi/BlockchainGatewayProxy.kt b/api/api-core/src/main/kotlin/co/nilin/opex/api/core/spi/BlockchainGatewayProxy.kt index 540da6e05..e131492a3 100644 --- a/api/api-core/src/main/kotlin/co/nilin/opex/api/core/spi/BlockchainGatewayProxy.kt +++ b/api/api-core/src/main/kotlin/co/nilin/opex/api/core/spi/BlockchainGatewayProxy.kt @@ -5,7 +5,7 @@ import co.nilin.opex.api.core.inout.DepositDetails interface BlockchainGatewayProxy { - suspend fun assignAddress(uuid: String, currency: String): AssignResponse + suspend fun assignAddress(uuid: String, currency: String): AssignResponse? suspend fun getDepositDetails(refs: List): List diff --git a/api/api-ports/api-binance-rest/pom.xml b/api/api-ports/api-binance-rest/pom.xml index 31a7cd2ec..413465dd8 100644 --- a/api/api-ports/api-binance-rest/pom.xml +++ b/api/api-ports/api-binance-rest/pom.xml @@ -15,10 +15,6 @@ api-binance-rest Api Binance Rest - - 2020.0.2 - - org.jetbrains.kotlin diff --git a/api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/controller/WalletController.kt b/api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/controller/WalletController.kt index 38c8b6dbe..7fe60516e 100644 --- a/api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/controller/WalletController.kt +++ b/api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/controller/WalletController.kt @@ -39,7 +39,7 @@ class WalletController( @CurrentSecurityContext securityContext: SecurityContext ): AssignAddressResponse { val response = bcGatewayProxy.assignAddress(securityContext.jwtAuthentication().name, coin) - val address = if (response.addresses.isNotEmpty()) response.addresses[0] else null + val address = if (response?.addresses?.isNotEmpty() == true) response.addresses[0] else null return AssignAddressResponse(address?.address ?: "", coin, "", "") } diff --git a/api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/proxy/BlockchainGatewayProxyImpl.kt b/api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/proxy/BlockchainGatewayProxyImpl.kt index b6f9c5ca4..aa19bd4ac 100644 --- a/api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/proxy/BlockchainGatewayProxyImpl.kt +++ b/api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/proxy/BlockchainGatewayProxyImpl.kt @@ -33,7 +33,7 @@ class BlockchainGatewayProxyImpl(private val client: WebClient) : BlockchainGate @Value("\${app.opex-bc-gateway.url}") private lateinit var baseUrl: String - override suspend fun assignAddress(uuid: String, currency: String): AssignResponse { + override suspend fun assignAddress(uuid: String, currency: String): AssignResponse? { logger.info("calling bc-gateway assign") return client.post() .uri(URI.create("$baseUrl/address/assign")) @@ -42,7 +42,7 @@ class BlockchainGatewayProxyImpl(private val client: WebClient) : BlockchainGate .body(Mono.just(AssignAddressRequest(uuid, currency))) .retrieve() .onStatus({ t -> t.isError }, { it.createException() }) - .bodyToMono(typeRef()) + .bodyToMono(AssignResponse::class.java) .awaitSingleOrNull() } diff --git a/bc-gateway/bc-gateway-app/pom.xml b/bc-gateway/bc-gateway-app/pom.xml index 3bbcc3e7c..5f92a0274 100644 --- a/bc-gateway/bc-gateway-app/pom.xml +++ b/bc-gateway/bc-gateway-app/pom.xml @@ -14,10 +14,6 @@ bc-gateway-app Blockchain gateway app of Opex - - 2020.0.2 - - org.jetbrains.kotlin diff --git a/bc-gateway/bc-gateway-app/src/main/resources/application-docker.yml b/bc-gateway/bc-gateway-app/src/main/resources/application-docker.yml index bfc84f3bb..518840557 100644 --- a/bc-gateway/bc-gateway-app/src/main/resources/application-docker.yml +++ b/bc-gateway/bc-gateway-app/src/main/resources/application-docker.yml @@ -17,8 +17,3 @@ spring: host: ${CONSUL_HOST} port: 8500 -app: - auth: - cert-url: lb://opex-auth/auth/realms/opex/protocol/openid-connect/certs - wallet: - url: lb://opex-wallet diff --git a/bc-gateway/bc-gateway-app/src/main/resources/application.yml b/bc-gateway/bc-gateway-app/src/main/resources/application.yml index c1698dc75..11af09b06 100644 --- a/bc-gateway/bc-gateway-app/src/main/resources/application.yml +++ b/bc-gateway/bc-gateway-app/src/main/resources/application.yml @@ -31,3 +31,8 @@ logging: org.apache.kafka: DEBUG swagger.authUrl: https://api.opex.dev +app: + auth: + cert-url: lb://opex-auth/auth/realms/opex/protocol/openid-connect/certs + wallet: + url: lb://opex-wallet \ No newline at end of file diff --git a/bc-gateway/bc-gateway-core/pom.xml b/bc-gateway/bc-gateway-core/pom.xml index fa6b76aa0..619be8c6d 100644 --- a/bc-gateway/bc-gateway-core/pom.xml +++ b/bc-gateway/bc-gateway-core/pom.xml @@ -15,7 +15,7 @@ Blockchain gateway core of Opex - 3.2.0 + 4.0.0 @@ -48,6 +48,7 @@ org.mockito.kotlin mockito-kotlin ${mockito-kotlin.version} + test co.nilin.opex.utility.error diff --git a/bc-gateway/bc-gateway-core/src/test/kotlin/co/nilin/opex/bcgateway/core/service/ChainSyncServiceImplTest.kt b/bc-gateway/bc-gateway-core/src/test/kotlin/co/nilin/opex/bcgateway/core/service/ChainSyncServiceImplTest.kt index 258080a8e..9897da8be 100644 --- a/bc-gateway/bc-gateway-core/src/test/kotlin/co/nilin/opex/bcgateway/core/service/ChainSyncServiceImplTest.kt +++ b/bc-gateway/bc-gateway-core/src/test/kotlin/co/nilin/opex/bcgateway/core/service/ChainSyncServiceImplTest.kt @@ -75,7 +75,7 @@ internal class ChainSyncServiceImplTest { syncService.startSyncWithChain() //then - verifyZeroInteractions( + verifyNoMoreInteractions( chainEndpointProxyFinder, chainSyncRecordHandler, walletSyncRecordHandler, diff --git a/eventlog/eventlog-app/src/main/resources/application.yml b/eventlog/eventlog-app/src/main/resources/application.yml index 51929e3d6..025ceaf4a 100644 --- a/eventlog/eventlog-app/src/main/resources/application.yml +++ b/eventlog/eventlog-app/src/main/resources/application.yml @@ -1,5 +1,7 @@ server.port: 8090 spring: + main: + allow-circular-references: true kafka: bootstrap-servers: localhost:9092 consumer: diff --git a/matching-engine/matching-engine-app/src/main/resources/application.yml b/matching-engine/matching-engine-app/src/main/resources/application.yml index bfb7b297e..5135d42eb 100644 --- a/matching-engine/matching-engine-app/src/main/resources/application.yml +++ b/matching-engine/matching-engine-app/src/main/resources/application.yml @@ -2,6 +2,7 @@ server.port: 8092 spring: main: allow-bean-definition-overriding: false + allow-circular-references: true kafka: bootstrap-servers: localhost:9092 consumer: diff --git a/matching-engine/matching-engine-ports/matching-engine-eventlistener-kafka/src/main/kotlin/co/nilin/opex/matching/engine/ports/kafka/listener/config/OrderKafkaConfig.kt b/matching-engine/matching-engine-ports/matching-engine-eventlistener-kafka/src/main/kotlin/co/nilin/opex/matching/engine/ports/kafka/listener/config/OrderKafkaConfig.kt index 02ff6d11f..7ece19ee6 100644 --- a/matching-engine/matching-engine-ports/matching-engine-eventlistener-kafka/src/main/kotlin/co/nilin/opex/matching/engine/ports/kafka/listener/config/OrderKafkaConfig.kt +++ b/matching-engine/matching-engine-ports/matching-engine-eventlistener-kafka/src/main/kotlin/co/nilin/opex/matching/engine/ports/kafka/listener/config/OrderKafkaConfig.kt @@ -97,7 +97,7 @@ class OrderKafkaConfig { val containerProps = ContainerProperties(*topics) containerProps.messageListener = orderKafkaListener val container = KafkaMessageListenerContainer(consumerFactory, containerProps) - container.beanName = "OrderKafkaListenerContainer" + container.setBeanName("OrderKafkaListenerContainer") container.start() } @@ -109,7 +109,7 @@ class OrderKafkaConfig { val containerProps = ContainerProperties(Pattern.compile("events_.*")) containerProps.messageListener = eventListener val container = ConcurrentMessageListenerContainer(consumerFactory, containerProps) - container.beanName = "EventKafkaListenerContainer" + container.setBeanName("EventKafkaListenerContainer") container.start() } diff --git a/matching-gateway/matching-gateway-app/pom.xml b/matching-gateway/matching-gateway-app/pom.xml index 95b96c395..583fe0d38 100644 --- a/matching-gateway/matching-gateway-app/pom.xml +++ b/matching-gateway/matching-gateway-app/pom.xml @@ -14,10 +14,6 @@ matching-gateway-app Matching gateway running app Opex - - 2020.0.2 - - org.jetbrains.kotlin diff --git a/matching-gateway/matching-gateway-app/src/main/resources/application-docker.yml b/matching-gateway/matching-gateway-app/src/main/resources/application-docker.yml index 2d59b2e9c..eddb20205 100644 --- a/matching-gateway/matching-gateway-app/src/main/resources/application-docker.yml +++ b/matching-gateway/matching-gateway-app/src/main/resources/application-docker.yml @@ -19,8 +19,3 @@ spring: instance-id: ${spring.application.name}:${server.port} healthCheckInterval: 20s prefer-ip-address: true -app: - accountant: - url: lb://opex-accountant - auth: - cert-url: lb://opex-auth/auth/realms/opex/protocol/openid-connect/certs \ No newline at end of file diff --git a/matching-gateway/matching-gateway-app/src/main/resources/application.yml b/matching-gateway/matching-gateway-app/src/main/resources/application.yml index 79c864f43..d968828ad 100644 --- a/matching-gateway/matching-gateway-app/src/main/resources/application.yml +++ b/matching-gateway/matching-gateway-app/src/main/resources/application.yml @@ -22,8 +22,9 @@ spring: instance-id: ${spring.application.name}:${server.port} healthCheckInterval: 20s prefer-ip-address: true +swagger.authUrl: https://api.opex.dev app: accountant: url: lb://opex-accountant - -swagger.authUrl: https://api.opex.dev \ No newline at end of file + auth: + cert-url: lb://opex-auth/auth/realms/opex/protocol/openid-connect/certs \ No newline at end of file diff --git a/pom.xml b/pom.xml index f0d2fef1a..404ff6a92 100644 --- a/pom.xml +++ b/pom.xml @@ -10,9 +10,10 @@ 1.0-SNAPSHOT - 1.8 - 1.4.31 - 2.4.4 + 13 + 1.6.0 + 2.6.2 + 2021.0.0 false @@ -59,11 +60,6 @@ - - org.springframework.cloud - spring-cloud-starter-consul-all - 3.0.4 - diff --git a/storage/storage-app/pom.xml b/storage/storage-app/pom.xml index 05d842ec2..dfe70c472 100644 --- a/storage/storage-app/pom.xml +++ b/storage/storage-app/pom.xml @@ -13,10 +13,6 @@ storage-app storage-app - - 2020.0.2 - - org.jetbrains.kotlinx @@ -62,6 +58,11 @@ org.springframework.boot spring-boot-starter-oauth2-resource-server + + net.minidev + json-smart + 2.4.7 + diff --git a/storage/storage-app/src/main/resources/application-docker.yml b/storage/storage-app/src/main/resources/application-docker.yml index 53df2e9b4..85269a646 100644 --- a/storage/storage-app/src/main/resources/application-docker.yml +++ b/storage/storage-app/src/main/resources/application-docker.yml @@ -2,12 +2,4 @@ spring: cloud: consul: host: ${CONSUL_HOST} - main: - allow-bean-definition-overriding: true -app: - cors: - allowed-hosts: https://opex.dev, http://localhost:3000 - allowed-patterns: http://192.168.* - auth: - cert-url: lb://opex-auth/auth/realms/opex/protocol/openid-connect/certs diff --git a/user-management/keycloak-gateway/pom.xml b/user-management/keycloak-gateway/pom.xml index 45ce3817c..a833d881c 100644 --- a/user-management/keycloak-gateway/pom.xml +++ b/user-management/keycloak-gateway/pom.xml @@ -17,11 +17,9 @@ 13 13 - 13 12.0.4 3.13.2.Final 11.0.10.Final - 2020.0.2 diff --git a/user-management/pom.xml b/user-management/pom.xml index 9e4906fdf..6da9f3002 100644 --- a/user-management/pom.xml +++ b/user-management/pom.xml @@ -9,6 +9,11 @@ 1.0-SNAPSHOT + + 2.4.4 + 2020.0.2 + + co.nilin.opex.auth user-management user-management diff --git a/wallet/wallet-app/pom.xml b/wallet/wallet-app/pom.xml index d0e6d1f50..2890168aa 100644 --- a/wallet/wallet-app/pom.xml +++ b/wallet/wallet-app/pom.xml @@ -14,12 +14,6 @@ wallet-app Wallet management app of Opex - - 1.8 - 1.4.31 - 2020.0.2 - - org.springframework.boot @@ -100,6 +94,11 @@ co.nilin.opex.utility.interceptors interceptors + + net.minidev + json-smart + 2.4.7 + diff --git a/wallet/wallet-app/src/main/resources/application.yml b/wallet/wallet-app/src/main/resources/application.yml index 4fba204a6..6b9be3fff 100644 --- a/wallet/wallet-app/src/main/resources/application.yml +++ b/wallet/wallet-app/src/main/resources/application.yml @@ -4,6 +4,7 @@ spring: name: opex-wallet main: allow-bean-definition-overriding: false + allow-circular-references: true kafka: bootstrap-servers: localhost:2181 consumer: diff --git a/websocket/websocket-app/pom.xml b/websocket/websocket-app/pom.xml index c0cc7950e..16228b9ed 100644 --- a/websocket/websocket-app/pom.xml +++ b/websocket/websocket-app/pom.xml @@ -14,10 +14,6 @@ websocket-app Websocket app - - 2020.0.2 - - org.springframework.boot diff --git a/websocket/websocket-app/src/main/resources/application-docker.yml b/websocket/websocket-app/src/main/resources/application-docker.yml index 81262acea..b1d77a0de 100644 --- a/websocket/websocket-app/src/main/resources/application-docker.yml +++ b/websocket/websocket-app/src/main/resources/application-docker.yml @@ -11,8 +11,3 @@ spring: consul: host: ${CONSUL_HOST} port: 8500 - main: - allow-bean-definition-overriding: true -app: - auth: - cert-url: http://auth:8083/auth/realms/opex/protocol/openid-connect/certs \ No newline at end of file diff --git a/websocket/websocket-app/src/main/resources/application.yml b/websocket/websocket-app/src/main/resources/application.yml index e7df088d6..a7a77a392 100644 --- a/websocket/websocket-app/src/main/resources/application.yml +++ b/websocket/websocket-app/src/main/resources/application.yml @@ -5,6 +5,7 @@ spring: name: opex-websocket main: allow-bean-definition-overriding: false + allow-circular-references: true kafka: bootstrap-servers: 192.168.178.29:9092 consumer: diff --git a/websocket/websocket-ports/websocket-eventlistener-kafka/src/main/kotlin/co/nilin/opex/websocket/ports/kafka/listener/config/WebSocketKafkaConfig.kt b/websocket/websocket-ports/websocket-eventlistener-kafka/src/main/kotlin/co/nilin/opex/websocket/ports/kafka/listener/config/WebSocketKafkaConfig.kt index cd49327c8..fdce66dbb 100644 --- a/websocket/websocket-ports/websocket-eventlistener-kafka/src/main/kotlin/co/nilin/opex/websocket/ports/kafka/listener/config/WebSocketKafkaConfig.kt +++ b/websocket/websocket-ports/websocket-eventlistener-kafka/src/main/kotlin/co/nilin/opex/websocket/ports/kafka/listener/config/WebSocketKafkaConfig.kt @@ -72,7 +72,7 @@ class WebSocketKafkaConfig { val containerProps = ContainerProperties(Pattern.compile("richTrade")) containerProps.messageListener = tradeListener val container = ConcurrentMessageListenerContainer(consumerFactory, containerProps) - container.beanName = "WebsocketTradeKafkaListenerContainer" + container.setBeanName("WebsocketTradeKafkaListenerContainer") container.start() } @@ -82,7 +82,7 @@ class WebSocketKafkaConfig { val containerProps = ContainerProperties(Pattern.compile("richOrder")) containerProps.messageListener = orderListener val container = ConcurrentMessageListenerContainer(consumerFactory, containerProps) - container.beanName = "WebsocketOrderKafkaListenerContainer" + container.setBeanName("WebsocketOrderKafkaListenerContainer") container.start() }