Browse Source

奕拓小屋,体征数据上传接口完成

hill9868 6 years ago
parent
commit
8c7cf0e814

+ 12 - 12
svr/svr-iot/pom.xml

@ -46,18 +46,18 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>org.springframework.boot</groupId>-->
            <!--<artifactId>spring-boot-starter-actuator</artifactId>-->
        <!--</dependency>-->
        <!--<dependency>-->
            <!--<groupId>org.springframework.cloud</groupId>-->
            <!--<artifactId>spring-cloud-starter-eureka</artifactId>-->
        <!--</dependency>-->
        <!--<dependency>-->
            <!--<groupId>org.springframework.cloud</groupId>-->
            <!--<artifactId>spring-cloud-starter-config</artifactId>-->
        <!--</dependency>-->
        <dependency>
            <groupId>com.alibaba</groupId>

+ 52 - 18
svr/svr-iot/src/main/resources/application.yml

@ -3,8 +3,9 @@ server:
  port: 10050
spring:
  jmx:
    default-domain: svr-iot
  application:
    name:  svr-iot  #注册到发现服务的id 如果id一样 eurika会自动做负载
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    max-active: 50
@ -22,14 +23,17 @@ spring:
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  # Elasticsearch Transport
  data:
    elasticsearch: #ElasticsearchProperties
      cluster-name: jkzl #默认即为elasticsearch  集群名
      local: false #是否本地连接
      properties: # Additional properties used to configure the client.
        enable: true
  # JEST (Elasticsearch HTTP client) (JestProperties)
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    # JEST (Elasticsearch HTTP client) (JestProperties)
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
#      uris: http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
#      username: # Login user.
@ -45,7 +49,6 @@ hibernate:
    naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy
fast-dfs:
  tracker-server: 172.19.103.54:22122 #服务器地址
  connect-timeout: 2 #链接超时时间
  network-timeout: 30
  charset: ISO8859-1 #编码
@ -58,25 +61,42 @@ fast-dfs:
    max-size: 20
    wait-time: 500
#暂时先不用hbase,先注释掉
#hadoop:
#  hbase-properties:
#    hbase.zookeeper.property.clientPort: 2181
#    zookeeper.znode.parent: /hbase-unsecure
#    hbase.zookeeper.quorum:  node1.hde.h3c.com,node2.hde.h3c.com,node3.hde.h3c.com
#  user:
#    name: root
---
spring:
  profiles: jwdev
  datasource:
    url: jdbc:mysql://172.19.103.77:3306/xmiot?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: root
    password: 123456
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
fast-dfs:
  tracker-server: 172.19.103.54:22122 #服务器地址
fastDFS:
  fastdfs_file_url: http://172.19.103.54:80/
---
spring:
  profiles: dev
  datasource:
    url: jdbc:mysql://172.26.0.204:3306/xmiot?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: ssgg
    password: ssgg@jkzl2019
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.26.0.203:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    jest:
      uris: http://172.26.0.202:9200
fast-dfs:
  tracker-server: 172.26.0.200:22122 #服务器地址
fastDFS:
  fastdfs_file_url: http://172.26.0.200:22122/
---
spring:
  profiles: jwtest
@ -84,6 +104,13 @@ spring:
    url: jdbc:mysql://172.19.103.77:3306/xmiot?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: root
    password: 123456
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
fast-dfs:
  tracker-server: 172.19.103.54:22122 #服务器地址
fastDFS:
  fastdfs_file_url: http://172.19.103.54:80/
@ -94,5 +121,12 @@ spring:
    url: jdbc:mysql://172.19.103.77:3306/xmiot?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: root
    password: 123456
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
fast-dfs:
  tracker-server: 172.19.103.54:22122 #服务器地址
fastDFS:
  fastdfs_file_url: http://172.19.103.54:80/

+ 29 - 21
svr/svr-iot/src/main/resources/bootstrap.yml

@ -1,24 +1,32 @@
spring:
  application:
    name: svr-iot
  cloud:
    config:
      failFast: true
      username: jw
      password: jkzl
---
spring:
  profiles: jwdev
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.17.110.212:1221}
      label: ${wlyy.spring.config.label:jwdev}
---
spring:
  profiles: jwtest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.17.110.212:1221}
      label: ${wlyy.spring.config.label:jwdev}
#  cloud:
                                               #    config:
                                               #      failFast: false
                                               #      username: jw
                                               #      password: jkzl
                                               #
                                               #---
                                               #spring:
                                               #  profiles: jwdev
                                               #  cloud:
                                               #    config:
                                               #      uri: ${wlyy.spring.config.uri:http://172.17.110.212:1221}
                                               #      label: ${wlyy.spring.config.label:jwdev}
                                               #
                                               #---
                                               #spring:
                                               #  profiles: dev
                                               #  cloud:
                                               #    config:
                                               #      uri: ${wlyy.spring.config.uri:http://localhost:1221}
                                               #      label: ${wlyy.spring.config.label:dev}
                                               #
                                               #---
                                               #spring:
                                               #  profiles: jwtest
                                               #  cloud:
                                               #    config:
                                               #      uri: ${wlyy.spring.config.uri:http://172.17.110.212:1221}
                                               #      label: ${wlyy.spring.config.label:jwdev}