Browse Source

********************WX******************
关系查询搜索

zhangweixin 3 years ago
parent
commit
4d65f71c5a

+ 14 - 14
datacenter/src/main/resources/application-test.yml

@@ -25,28 +25,28 @@ server:
 
 spring:
   datasource:
-    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
     #url:                                jdbc:postgresql://datacenter:5432/datacenterlabsl
-#    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
+    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
 #    url:                                jdbc:postgresql://datacenter:5432/datacenter
     username:                           postgres
     password:                           cGVyc2FneV8yMDIwcXdlIUAj
 
-  rabbitmq:
-    host: 192.168.100.108
-    port: 9936
-    username: pbsage
-    password: pbsage123
-    #虚拟host 可以不设置,使用server默认host
-    virtual-host: /adm
-
 #  rabbitmq:
-#    host: 192.168.64.15
+#    host: 192.168.100.108
 #    port: 9936
-#    username: admin
-#    password: brzj123456
+#    username: pbsage
+#    password: pbsage123
 #    #虚拟host 可以不设置,使用server默认host
-#    virtual-host: /test
+#    virtual-host: /adm
+
+  rabbitmq:
+    host: 192.168.64.15
+    port: 9936
+    username: admin
+    password: brzj123456
+    #虚拟host 可以不设置,使用server默认host
+    virtual-host: /test
 
 
   servlet:

+ 1 - 1
datasyn/build.gradle

@@ -69,7 +69,7 @@ dependencies {
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // spring cloud 依赖
-//    compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka', version: SPRING_CLOUD_VERSION
+    compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka', version: SPRING_CLOUD_VERSION
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // MySQL

+ 4 - 2
datasyn/src/main/kotlin/com/persagy/server/syn/DataSynApp.kt

@@ -33,6 +33,8 @@ import org.springframework.boot.SpringApplication
 import org.springframework.boot.autoconfigure.SpringBootApplication
 import org.springframework.boot.builder.SpringApplicationBuilder
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
+import org.springframework.cloud.client.loadbalancer.LoadBalanced
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient
 //import org.springframework.cloud.client.loadbalancer.LoadBalanced
 //import org.springframework.cloud.netflix.eureka.EnableEurekaClient
 import org.springframework.context.annotation.Bean
@@ -51,7 +53,7 @@ import org.springframework.web.client.RestTemplate
 @EnableScheduling   //开启定时注解
 @ComponentScan(basePackages = ["com.persagy", "com.persagy.server"])           // 配置组件扫描路径
 @MapperScan("com.persagy", "com.persagy.server")                       // Mapper组件扫描路径
-//@EnableEurekaClient
+@EnableEurekaClient
 @SpringBootApplication
 open class DataSynApp : SpringBootServletInitializer() {
     companion object {
@@ -61,7 +63,7 @@ open class DataSynApp : SpringBootServletInitializer() {
 
 
     @Bean
-//    @LoadBalanced //在注册中心里进行查找微服务,负载均衡
+    @LoadBalanced //在注册中心里进行查找微服务,负载均衡
     open fun restTemplate(): RestTemplate? {
         return RestTemplate()
     }

+ 10 - 20
datasyn/src/main/resources/application-test.yml

@@ -12,45 +12,35 @@ eureka:
 
 spring:
   datasource:
-#    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
-    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
+#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
     username:                           postgres
     password:                           cGVyc2FneV8yMDIwcXdlIUAj
 
 
 
-
     #配置rabbitMq 服务器
   rabbitmq:
-    host: 192.168.100.108
+    host: 192.168.64.15
     port: 9936
-    username: pbsage
-    password: pbsage123
+    username: admin
+    password: brzj123456
     #虚拟host 可以不设置,使用server默认host
-    virtual-host: /adm
-
-#  rabbitmq:
-#    host: 192.168.64.15
-#    port: 9936
-#    username: admin
-#    password: brzj123456
-#    #虚拟host 可以不设置,使用server默认host
-#    virtual-host: /test
-
+    virtual-host: /test
 
 saga:
   dataPlatform:                        http://192.168.64.17:8832
 #  dataPlatform:                        http://39.102.40.239:9970
-  data_org:                            http://common/dmp-org
-  data_rwd:                            http://common/dmp-rwd
-  data_dic:                            http://common/dmp-dic
+  data_org:                            http://192.168.64.17:8831
+  data_rwd:                            http://192.168.64.17:8832
+  data_dic:                            http://192.168.64.17:8830
 mqtopid:
   exchange:                           exchange-dmp
   routingKey:
 
 custom:
   #true 代表eureka  false  代表 http
-  eurekaorhttp:                       false
+  eurekaorhttp:                       true
 
 # 服务名
 servicename:

+ 20 - 10
datasyn/src/main/resources/application-test2.yml

@@ -12,35 +12,45 @@ eureka:
 
 spring:
   datasource:
-    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
-#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+#    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
+    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
     username:                           postgres
     password:                           cGVyc2FneV8yMDIwcXdlIUAj
 
 
 
+
     #配置rabbitMq 服务器
   rabbitmq:
-    host: 192.168.64.15
+    host: 192.168.100.108
     port: 9936
-    username: admin
-    password: brzj123456
+    username: pbsage
+    password: pbsage123
     #虚拟host 可以不设置,使用server默认host
-    virtual-host: /test
+    virtual-host: /adm
+
+#  rabbitmq:
+#    host: 192.168.64.15
+#    port: 9936
+#    username: admin
+#    password: brzj123456
+#    #虚拟host 可以不设置,使用server默认host
+#    virtual-host: /test
+
 
 saga:
   dataPlatform:                        http://192.168.64.17:8832
 #  dataPlatform:                        http://39.102.40.239:9970
-  data_org:                            http://192.168.64.17:8831
-  data_rwd:                            http://192.168.64.17:8832
-  data_dic:                            http://192.168.64.17:8830
+  data_org:                            http://common/dmp-org
+  data_rwd:                            http://common/dmp-rwd
+  data_dic:                            http://common/dmp-dic
 mqtopid:
   exchange:                           exchange-dmp
   routingKey:
 
 custom:
   #true 代表eureka  false  代表 http
-  eurekaorhttp:                       true
+  eurekaorhttp:                       false
 
 # 服务名
 servicename: