Browse Source

1.清除lfq的配置,dev连接到57数据库上,用于检测异常情况
2.gatway增加log的流程用于写出出参入参
3.JMS修订Body的输出

Airhead 8 years ago
parent
commit
e73f5c1334

+ 1 - 35
hos-arbiter/src/main/resources/application.yml

@ -23,8 +23,6 @@ arbiter:
    period: 10000
  central:
    url: localhost:15555
  terminal:
    url: localhost:15555
  tenant:
    name: jkzl
@ -73,38 +71,6 @@ arbiter:
  timer:
      period: 10000
  central:
    url:
  terminal:
    url: 192.168.131.38:15555
  tenant:
    name: yichang
---
spring:
  profiles: lfq
  data:
    mongodb:
      host: 172.19.103.57
      port: 27017
      username: esb
      password: esb
      authenticationDatabase: admin
      database: runtime
  activemq:
    broker-url: tcp://172.19.103.57:61616
    user: admin
    password: admin
arbiter:
  timer:
      period: 10000
  central:
    url: 192.168.131.38:15555
  tenant:
    name: jkzl
  mycat:
    name: mycat192.168.131.38    ##mycat 服务器标识,规则:“mycat"+ 本机IP
#jcraft shell操作
jcraft:
  host: 172.19.103.57
  port: 22
  user: root
  password: ceshi
    name: yichang

+ 1 - 66
hos-broker/src/main/resources/application.yml

@ -17,26 +17,13 @@ camel:
---
spring:
  profiles: dev
#  datasource:
#    driverClassName: com.mysql.jdbc.Driver
#    url: jdbc:mysql://192.168.1.220:8066/hos2?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
#    username: hos
#    password: 123456
#    test-on-borrow: true
#    validation-query: SELECT 1
#    test-while-idle: true
#    max-active: 30
#    default-auto-commit: true
#    max-idle: 30
#    min-idle: 10
#    initial-size: 10
  activemq:
      broker-url: tcp://172.19.103.57:61616
      user: admin
      password: admin
  data:
    mongodb:
      host: 172.19.103.58
      host: 172.19.103.57
      port: 27017
      username: esb
      password: esb
@ -70,19 +57,6 @@ hos:
---
spring:
  profiles: test
#  datasource:
#    driverClassName: com.mysql.jdbc.Driver
#    url: jdbc:mysql://mysql:3306/hos1?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
#    username: hos
#    password: 123456
#    test-on-borrow: true
#    validation-query: SELECT 1
#    test-while-idle: true
#    max-active: 30
#    default-auto-commit: true
#    max-idle: 30
#    min-idle: 10
#    initial-size: 10
  activemq:
      broker-url: tcp://activemq:61616
      user: admin
@ -119,42 +93,3 @@ hos:
    port: 22
    user: root
    password: ceshi
---
spring:
  profiles: lfq
  activemq:
      broker-url: tcp://172.19.103.57:61616
      user: admin
      password: admin
  data:
    mongodb:
      host: 172.19.103.57
      port: 27017
      username: esb
      password: esb
      authenticationDatabase: admin
      database: log
      gridFsDatabase: dfs
  camel.gateway:
    ip: localhost
    port: 8066
server:
  port: 8099
hos:
  esb:
    rest-url: http://192.168.131.38:8080/esb
  arbiter:
    enable: true
    url: http://192.168.131.38:10135
  rest:
    url: http://192.168.131.38:8088
  timer:
      period: 10000
  tenant:
    name: yichang
  #jcraft shell操作
  jcraft:
    host: 172.19.103.57
    port: 22
    user: root
    password: ceshi

+ 2 - 2
hos-camel2/pom.xml

@ -5,9 +5,9 @@
    <parent>
        <groupId>com.yihu.hos</groupId>
        <artifactId>hos-camel-parent</artifactId>
        <artifactId>hos-parent</artifactId>
        <version>1.3.0</version>
        <relativePath>../hos-camel-parent</relativePath><!-- lookup parent from repository -->
        <relativePath>../hos-parent</relativePath><!-- lookup parent from repository -->
    </parent>
    <artifactId>hos-camel2</artifactId>

+ 2 - 0
hos-camel2/src/main/java/camel/gateway/processor/GatewayProcessor.java

@ -179,6 +179,8 @@ public class GatewayProcessor implements Processor {
                String value = paramNode.asText();
                if (p.getType().equals("0")) { //path param
                    endPoint[0] = endPoint[0].replaceAll("\\{[^}]*\\}", value);
                } else if (p.getType().equals("2")) { //head param
                    exchange.getOut().setHeader(p.getName(), value);
                }
                body[0] += ("&" + p.getName() + "=" + value);

+ 3 - 1
hos-camel2/src/main/java/camel/gateway/route/GatewayRouterBuilder.java

@ -20,8 +20,10 @@ public class GatewayRouterBuilder extends RouteBuilder {
                .to("jetty:http://127.0.0.1:10000?bridgeEndpoint=true&throwExceptionOnFailure=false");
        from("jetty:http://0.0.0.0:9999/api").routeId("api")
                .log(body().toString())
                .process(new GatewayProcessor())
                .routingSlip(method(GatewayProcessor.class, "route"));
                .routingSlip(method(GatewayProcessor.class, "route"))
                .log(body().toString());
        from("jetty:http://0.0.0.0:9999/error")
                .choice()

+ 1 - 1
hos-camel-parent/pom.xml

@ -5,7 +5,7 @@
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.yihu.hos</groupId>
    <artifactId>hos-camel-parent</artifactId>
    <artifactId>hos-parent</artifactId>
    <packaging>pom</packaging>
    <version>1.3.0</version>

+ 6 - 0
hos-web-camel-dependencies/pom.xml

@ -116,6 +116,12 @@
            <version>${camel.version}</version>
            <!-- use the same version as your Camel core version -->
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-restlet</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.activemq/activemq-camel -->
        <dependency>
            <groupId>xom</groupId>

+ 2 - 55
src/main/resources/application.yml

@ -24,7 +24,7 @@ spring:
  #SAAS管理员账号,暂时配置在此处
  datasource:
      driverClassName: com.mysql.jdbc.Driver
      url: jdbc:mysql://192.168.1.220:8066/global_db?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
      url: jdbc:mysql://172.19.103.57:8066/global_db?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
      username: hos
      password: 123456
      test-on-borrow: true
@ -50,11 +50,6 @@ spring:
      authenticationDatabase: admin
      gridFsDatabase: dfs
      database: runtime
#  activemq:
#    broker-url: tcp://172.19.103.57:61616?wireFormat.maxInactivityDuration=0
#    user: admin
#    password: admin
#    pooled: false
  aop:
    proxy-target-class: true
hos:
@ -110,52 +105,4 @@ hos:
    port: 15555
    store: ./store
  mysql:
    filePath: /usr/local/esb/esb.sql   #租户基础表 sql文件位置
---
spring:
  #SAAS管理员账号,暂时配置在此处
  administrators: jkzl
  profiles: lfq
  #SAAS管理员账号,暂时配置在此处
  datasource:
      driverClassName: com.mysql.jdbc.Driver
      url: jdbc:mysql://192.168.1.220:8066/global_db?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
      username: hos
      password: 123456
      test-on-borrow: true
      validation-query: SELECT 1
      test-while-idle: true
      max-total: 100
      default-auto-commit: true
      max-idle: 50
      min-idle: 20
      initial-size: 10
  jpa:
    database-platform: org.hibernate.dialect.MySQL5Dialect
    hibernate:
      dialect: org.hibernate.dialect.MySQL5Dialect
    format-sql: true
    show-sql: false
  data:
    mongodb:
      host: 172.19.103.57
      port: 27017
      username: esb
      password: esb
      authenticationDatabase: admin
      gridFsDatabase: dfs
      database: runtime
#  activemq:
#    broker-url: tcp://172.19.103.57:61616?wireFormat.maxInactivityDuration=0
#    user: admin
#    password: admin
#    pooled: false
  aop:
    proxy-target-class: true
hos:
  zbus:
    port: 15555
    store: ./store
  mysql:
    filePath: e://learn.sql   #租户基础表 sql文件位置
    filePath: /usr/local/esb/esb.sql   #租户基础表 sql文件位置