浏览代码

Merge branch 'master' of http://192.168.1.220:10080/esb/esb

zhenglingfeng 8 年之前
父节点
当前提交
7cf9c77fe2

+ 5 - 3
hos-broker/src/main/java/com/yihu/hos/models/BusinessLog.java

@ -23,8 +23,10 @@ public class BusinessLog {
    private String breadcrumbId;
    private String camelContextId;
    private String body;
    private String bodyLength;
    private Integer bodyLength;
    private String fireTimeSource;
    //@Indexed(name = "fireTime_1", expireAfterSeconds = 30)
    @Indexed
    private Date fireTime;  //后期建议转成TTL
@ -100,11 +102,11 @@ public class BusinessLog {
        this.fireTime = fireTime;
    }
    public String getBodyLength() {
    public Integer getBodyLength() {
        return bodyLength;
    }
    public void setBodyLength(String bodyLength) {
    public void setBodyLength(Integer bodyLength) {
        this.bodyLength = bodyLength;
    }

+ 1 - 0
hos-broker/src/main/java/com/yihu/hos/services/BusinessLogService.java

@ -26,6 +26,7 @@ public class BusinessLogService {
            BusinessLog businessLog = objectMapper.readValue(msg, BusinessLog.class);
            String fireTimeSource = businessLog.getFireTimeSource();
            businessLog.setFireTime(DateUtil.toTimestamp(fireTimeSource));
            businessLog.setBodyLength(businessLog.getBody().length());
            mongoOperations.save(businessLog);
        } catch (IOException e) {
            e.printStackTrace();

+ 18 - 8
src/main/resources/application.yml

@ -1,3 +1,5 @@
application:
  message: ESB
server:
  context-path: /
  port: 8080
@ -26,9 +28,6 @@ spring:
      password: esb
      authenticationDatabase: admin
      database: configuration
  application:
    name: ESB
  activemq:
    broker-url: tcp://172.19.103.86:61616?wireFormat.maxInactivityDuration=0
    user: admin
@ -46,9 +45,6 @@ spring:
      password: esb
      authenticationDatabase: admin
      database: configuration
  application:
    name: ESB
  activemq:
    broker-url: tcp://172.19.103.86:61616?wireFormat.maxInactivityDuration=0
    user: admin
@ -65,5 +61,19 @@ spring:
#      database: configuration
---
application:
  message: ESB
spring:
  profiles: lfq
  data:
    mongodb:
      host: 172.19.103.86
      port: 27017
      username: esb
      password: esb
      authenticationDatabase: admin
      database: configuration
  activemq:
    broker-url: tcp://172.19.103.86:61616?wireFormat.maxInactivityDuration=0
    user: admin
    password: admin
    pooled: false