|
@@ -1,32 +1,83 @@
|
|
|
server:
|
|
|
- port: 8099
|
|
|
+ port: 8093
|
|
|
spring:
|
|
|
+ cloud:
|
|
|
+ nacos:
|
|
|
+ discovery:
|
|
|
+ server-addr: 47.98.40.154:8848
|
|
|
+ ephemeral: false
|
|
|
+ config:
|
|
|
+ server-addr: 47.98.40.154:8848 # Nacos 配置服务地址
|
|
|
+ namespace: public # Nacos 命名空间
|
|
|
+ group: DEFAULT_GROUP # Nacos 配置组
|
|
|
+
|
|
|
application:
|
|
|
name: huimv-eartag2-manage2
|
|
|
+ autoconfigure:
|
|
|
+ exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
|
|
+ shardingsphere:
|
|
|
+ datasource:
|
|
|
+ props:
|
|
|
+ sql:
|
|
|
+ show: true
|
|
|
+ names: ds0,ds1,dbm
|
|
|
+ dbm:
|
|
|
+ type: com.zaxxer.hikari.HikariDataSource
|
|
|
+ # type: com.alibaba.druid.pool.DruidDataSource
|
|
|
+ jdbc-url: jdbc:mysql://115.238.57.190:3306/huimv-demo-eartag-new?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
|
|
|
+ username: root
|
|
|
+ password: hm123456
|
|
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
+ ds0:
|
|
|
+ type: com.zaxxer.hikari.HikariDataSource
|
|
|
+ # type: com.alibaba.druid.pool.DruidDataSource
|
|
|
+ jdbc-url: jdbc:mysql://115.238.57.190:3306/huimv-demo-eartag-new0?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
|
|
|
+ username: root
|
|
|
+ password: hm123456
|
|
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
+ # hikari:
|
|
|
+ # sqlSessionFactoryRef: mySqlSessionFactory
|
|
|
+ ds1:
|
|
|
+ type: com.zaxxer.hikari.HikariDataSource
|
|
|
+ # type: com.alibaba.druid.pool.DruidDataSourc
|
|
|
+ jdbc-url: jdbc:mysql://115.238.57.190:3306/huimv-demo-eartag-new1?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
|
|
|
+ username: root
|
|
|
+ password: hm123456
|
|
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
+ sharding:
|
|
|
+ tables:
|
|
|
+ eartag_data:
|
|
|
+ actual-data-nodes: ds$->{0..1}.eartag_data$->{0..2}
|
|
|
+ table-strategy:
|
|
|
+ inline:
|
|
|
+ sharding-column: earmark
|
|
|
+ algorithm-expression: eartag_data_$->{earmark.hashCode() % 3}
|
|
|
+ # complex:
|
|
|
+ # sharding-column: create_date
|
|
|
+ # algorithm-expression: base_farm_${date_format(create_date,'yyyyMM')}
|
|
|
+ database-strategy:
|
|
|
+ inline:
|
|
|
+ sharding-column: farm_id
|
|
|
+ algorithm-expression: ds$->{farm_id.hashCode() % 2}
|
|
|
+ default-data-source-name: dbm
|
|
|
|
|
|
- datasource:
|
|
|
- url: jdbc:mysql://115.238.57.190:3306/huimv-eartag2-platform?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
|
|
|
- username: root
|
|
|
- password: hm123456
|
|
|
- driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
+ # datasource:
|
|
|
+ # url: jdbc:mysql://115.238.57.190:3306/huimv-demo-eartag20?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
|
|
|
+ # username: root
|
|
|
+ # password: hm123456
|
|
|
+ # driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
jpa:
|
|
|
show-sql: false
|
|
|
database: mysql
|
|
|
hibernate:
|
|
|
- ddl-auto: update
|
|
|
+ ddl-auto: none
|
|
|
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
|
open-in-view: true
|
|
|
|
|
|
- #配置rabbitMq 服务器
|
|
|
-# rabbitmq:
|
|
|
-# host: 10.0.0.4
|
|
|
-# port: 5672
|
|
|
-# username: huimv
|
|
|
-# password: hm123456
|
|
|
-# #虚拟host 可以不设置,使用server默认host
|
|
|
-# virtual-host: /
|
|
|
+
|
|
|
rabbitmq:
|
|
|
- host: 192.168.1.170
|
|
|
+ host: 139.9.172.209
|
|
|
+ # host: 10.0.0.14
|
|
|
port: 5672
|
|
|
username: admin
|
|
|
password: admin
|
|
@@ -34,12 +85,13 @@ spring:
|
|
|
virtual-host: /
|
|
|
listener:
|
|
|
simple:
|
|
|
- acknowledge-mode: none #消费端不需要确认
|
|
|
+ acknowledge-mode: none
|
|
|
|
|
|
#redis
|
|
|
redis:
|
|
|
database: 0
|
|
|
- host: 192.168.1.68
|
|
|
+ host: 121.36.134.218
|
|
|
+ # host: 10.0.0.14
|
|
|
port: 6379
|
|
|
password: hm123456
|
|
|
timeout: 5000ms
|
|
@@ -50,63 +102,14 @@ spring:
|
|
|
max-idle: 10
|
|
|
min-idle: 0
|
|
|
|
|
|
- #redis
|
|
|
-# redis:
|
|
|
-# database: 0
|
|
|
-# host: 192.168.1.68
|
|
|
-# port: 6379
|
|
|
-# password: hm123456
|
|
|
-# timeout: 5000ms
|
|
|
-# jedis:
|
|
|
-# pool:
|
|
|
-# max-active: 20
|
|
|
-# max-wait: -1
|
|
|
-# max-idle: 10
|
|
|
-# min-idle: 0
|
|
|
-# lettuce:
|
|
|
-# pool:
|
|
|
-# max-active: 3
|
|
|
-# min-idle: 2
|
|
|
-# max-idle: 3
|
|
|
-# max-wait: 1
|
|
|
-# shutdown-timeout: 100
|
|
|
-
|
|
|
-# data:
|
|
|
-# redis:
|
|
|
-# repositories:
|
|
|
-# enabled: false
|
|
|
|
|
|
- #是否缓存空值
|
|
|
-# cache:
|
|
|
-# redis:
|
|
|
-# cache-null-values: false
|
|
|
- #server:
|
|
|
-# port: 9110
|
|
|
-#spring:
|
|
|
-# application:
|
|
|
-# name: huimv-hy-autoGetData
|
|
|
-#
|
|
|
-# datasource:
|
|
|
-## url: jdbc:mysql://47.98.175.112:3306/huimv_ql_farm_haiyan?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
|
|
|
-# # url: jdbc:mysql://36.22.189.214:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
|
|
|
-# url: jdbc:mysql://115.238.57.190:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
|
|
|
-# username: root
|
|
|
-# password: hm123456
|
|
|
-# driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
-# jpa:
|
|
|
-# properties:
|
|
|
-# hibernate:
|
|
|
-# enable_lazy_load_no_trans: true
|
|
|
-# show-sql: false
|
|
|
-# database: mysql
|
|
|
-# hibernate:
|
|
|
-# ddl-auto: update
|
|
|
-# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
|
-# open-in-view: true
|
|
|
|
|
|
mybatis-plus:
|
|
|
configuration:
|
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
|
# mapper.xml文件所存放的位置
|
|
|
mapper-locations: classpath*:com/huimv/eartag2/manage2/mapper/xml/*.xml # 不加这一行出错:“org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)”
|
|
|
-
|
|
|
+management:
|
|
|
+ health:
|
|
|
+ db:
|
|
|
+ enabled: false
|