From b2e4ba2620035bbf16bea1329c2a7a1557c49363 Mon Sep 17 00:00:00 2001 From: "jimin.jm" Date: Tue, 12 Mar 2019 00:38:02 +0800 Subject: [PATCH] fix #417 when fescar upgrade 0.2.0+ configuration file changed --- .../resources/{application.conf => file.conf} | 10 ++++++ .../src/main/resources/registry.conf | 35 +++++++++++++++++++ .../resources/{application.conf => file.conf} | 10 ++++++ .../src/main/resources/registry.conf | 35 +++++++++++++++++++ .../resources/{application.conf => file.conf} | 10 ++++++ .../src/main/resources/registry.conf | 35 +++++++++++++++++++ .../resources/{application.conf => file.conf} | 10 ++++++ .../src/main/resources/registry.conf | 35 +++++++++++++++++++ 8 files changed, 180 insertions(+) rename spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/{application.conf => file.conf} (85%) create mode 100644 spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/registry.conf rename spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/{application.conf => file.conf} (85%) create mode 100644 spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/registry.conf rename spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/{application.conf => file.conf} (85%) create mode 100644 spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/registry.conf rename spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/{application.conf => file.conf} (85%) create mode 100644 spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/registry.conf diff --git a/spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/application.conf b/spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/file.conf similarity index 85% rename from spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/application.conf rename to spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/file.conf index b264dd9d..857b089e 100644 --- a/spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/application.conf +++ b/spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/file.conf @@ -3,6 +3,8 @@ transport { type = "TCP" #NIO NATIVE server = "NIO" + #enable heartbeat + heartbeat = true #thread factory for netty thread-factory { boss-thread-prefix = "NettyBoss" @@ -28,3 +30,11 @@ service { #disable disable = false } + +client { + async.commit.buffer.limit = 10000 + lock { + retry.internal = 10 + retry.times = 30 + } +} \ No newline at end of file diff --git a/spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/registry.conf b/spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/registry.conf new file mode 100644 index 00000000..8a79c9f2 --- /dev/null +++ b/spring-cloud-alibaba-examples/fescar-example/account-service/src/main/resources/registry.conf @@ -0,0 +1,35 @@ +registry { + # file 、nacos 、redis + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + redis { + serverAddr = "localhost:6379" + db = "0" + } + file { + name = "file.conf" + } +} + +config { + # file nacos apollo + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + apollo { + app.id = "fescar-server" + apollo.meta = "http://192.168.1.204:8801" + } + file { + name = "file.conf" + } +} \ No newline at end of file diff --git a/spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/application.conf b/spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/file.conf similarity index 85% rename from spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/application.conf rename to spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/file.conf index 65b69508..b087a18c 100644 --- a/spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/application.conf +++ b/spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/file.conf @@ -3,6 +3,8 @@ transport { type = "TCP" #NIO NATIVE server = "NIO" + #enable heartbeat + heartbeat = true #thread factory for netty thread-factory { boss-thread-prefix = "NettyBoss" @@ -28,3 +30,11 @@ service { #disable disable = false } + +client { + async.commit.buffer.limit = 10000 + lock { + retry.internal = 10 + retry.times = 30 + } +} \ No newline at end of file diff --git a/spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/registry.conf b/spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/registry.conf new file mode 100644 index 00000000..8a79c9f2 --- /dev/null +++ b/spring-cloud-alibaba-examples/fescar-example/business-service/src/main/resources/registry.conf @@ -0,0 +1,35 @@ +registry { + # file 、nacos 、redis + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + redis { + serverAddr = "localhost:6379" + db = "0" + } + file { + name = "file.conf" + } +} + +config { + # file nacos apollo + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + apollo { + app.id = "fescar-server" + apollo.meta = "http://192.168.1.204:8801" + } + file { + name = "file.conf" + } +} \ No newline at end of file diff --git a/spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/application.conf b/spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/file.conf similarity index 85% rename from spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/application.conf rename to spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/file.conf index c298ca0c..4f893da5 100644 --- a/spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/application.conf +++ b/spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/file.conf @@ -3,6 +3,8 @@ transport { type = "TCP" #NIO NATIVE server = "NIO" + #enable heartbeat + heartbeat = true #thread factory for netty thread-factory { boss-thread-prefix = "NettyBoss" @@ -28,3 +30,11 @@ service { #disable disable = false } + +client { + async.commit.buffer.limit = 10000 + lock { + retry.internal = 10 + retry.times = 30 + } +} \ No newline at end of file diff --git a/spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/registry.conf b/spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/registry.conf new file mode 100644 index 00000000..8a79c9f2 --- /dev/null +++ b/spring-cloud-alibaba-examples/fescar-example/order-service/src/main/resources/registry.conf @@ -0,0 +1,35 @@ +registry { + # file 、nacos 、redis + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + redis { + serverAddr = "localhost:6379" + db = "0" + } + file { + name = "file.conf" + } +} + +config { + # file nacos apollo + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + apollo { + app.id = "fescar-server" + apollo.meta = "http://192.168.1.204:8801" + } + file { + name = "file.conf" + } +} \ No newline at end of file diff --git a/spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/application.conf b/spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/file.conf similarity index 85% rename from spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/application.conf rename to spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/file.conf index 4bc5989e..29c81842 100644 --- a/spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/application.conf +++ b/spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/file.conf @@ -3,6 +3,8 @@ transport { type = "TCP" #NIO NATIVE server = "NIO" + #enable heartbeat + heartbeat = true #thread factory for netty thread-factory { boss-thread-prefix = "NettyBoss" @@ -28,3 +30,11 @@ service { #disable disable = false } + +client { + async.commit.buffer.limit = 10000 + lock { + retry.internal = 10 + retry.times = 30 + } +} \ No newline at end of file diff --git a/spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/registry.conf b/spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/registry.conf new file mode 100644 index 00000000..8a79c9f2 --- /dev/null +++ b/spring-cloud-alibaba-examples/fescar-example/storage-service/src/main/resources/registry.conf @@ -0,0 +1,35 @@ +registry { + # file 、nacos 、redis + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + redis { + serverAddr = "localhost:6379" + db = "0" + } + file { + name = "file.conf" + } +} + +config { + # file nacos apollo + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + apollo { + app.id = "fescar-server" + apollo.meta = "http://192.168.1.204:8801" + } + file { + name = "file.conf" + } +} \ No newline at end of file