Commit 07d55301 authored by litengwei's avatar litengwei

配置文件提交

parent 72c97b99
......@@ -20,14 +20,15 @@ ribbon.MaxAutoRetries = 1
xiy_amos_satety_business
spring.reactor.debug-agent.enabled=true
#DB properties:
spring.datasource.url=jdbc:vastbase://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023
spring.datasource.driver-class-name = cn.com.vastbase.Driver
spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#spring.datasource.url=jdbc:vastbase://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
#spring.datasource.username=admin
#spring.datasource.password=Yeejoin@2023
#spring.datasource.driver-class-name = cn.com.vastbase.Driver
#spring.datasource.hikari.maxLifetime = 1765000
#spring.datasource.hikari.maximum-pool-size = 10
#spring.datasource.testWhileIdle = true
#spring.datasource.validationQuery = SELECT 1
security.password=a1234560
security.loginId=admin
......@@ -47,7 +48,7 @@ spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000
#巡检计划定时任务
jobs.cron = 0 2 18 * * ?
jobs.cron = -
#邮件配置
#params.mailPush = false
......@@ -120,3 +121,70 @@ spring.jpa.properties.hibernate.jdbc.batch_versioned_data=true
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates =true
spring.shardingsphere.mode.type=Standalone
spring.shardingsphere.mode.repository.type=JDBC
# ds0
spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds0.driver-class-name=cn.com.vastbase.Driver
spring.shardingsphere.datasource.ds0.jdbc-url=jdbc:vastbase://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.shardingsphere.datasource.ds0.username=admin
spring.shardingsphere.datasource.ds0.password=Yeejoin@2023
spring.shardingsphere.datasource.ds0.idle-timeout=600000
spring.shardingsphere.datasource.ds0.connection-timeout=30000
spring.shardingsphere.datasource.ds0.validation-timeout=3000
spring.shardingsphere.datasource.ds0.max-lifetime=58880
spring.shardingsphere.datasource.ds0.minimum-idle=10
spring.shardingsphere.datasource.ds0.maximum-pool-size=50
#数据源名称,多数据源以逗号分隔
spring.shardingsphere.datasource.names=ds0
# 这里由于分库分表字段不相同配置,不然会导致使用user_id 查询找不到相应的表,如果我们分库分表都使用 user_id 则不需要这个配置
spring.shardingsphere.rules.sharding.tables.p_plan_task_history.actual-data-nodes = ds0.p_plan_task_history_$->{1..2}
spring.shardingsphere.rules.sharding.tables.p_plan_task_detail_history.actual-data-nodes = ds0.p_plan_task_detail_history_$->{1..2}
spring.shardingsphere.rules.sharding.tables.p_check_history.actual-data-nodes = ds0.p_check_history_$->{1..2}
spring.shardingsphere.rules.sharding.tables.p_check_input_history.actual-data-nodes = ds0.p_check_input_history_$->{1..2}
spring.shardingsphere.rules.sharding.tables.p_check_shot_history.actual-data-nodes = ds0.p_check_shot_history_$->{1..2}
spring.shardingsphere.sharding.default-data.source-name=ds0
spring.main.allow-bean-definition-overriding=true
# -----分表开始
# 分片键位sequence_nbr,每个库分为两表,所以取模2
spring.shardingsphere.rules.sharding.tables.p_plan_task_history.table-strategy.standard.sharding-column=id
spring.shardingsphere.rules.sharding.tables.p_plan_task_history.table-strategy.standard.sharding-algorithm-name=task-inline
spring.shardingsphere.rules.sharding.tables.p_plan_task_detail_history.table-strategy.standard.sharding-column=id
spring.shardingsphere.rules.sharding.tables.p_plan_task_detail_history.table-strategy.standard.sharding-algorithm-name=task-detail-inline
spring.shardingsphere.rules.sharding.tables.p_check_history.table-strategy.standard.sharding-column=id
spring.shardingsphere.rules.sharding.tables.p_check_history.table-strategy.standard.sharding-algorithm-name=check-inline
spring.shardingsphere.rules.sharding.tables.p_check_input_history.table-strategy.standard.sharding-column=id
spring.shardingsphere.rules.sharding.tables.p_check_input_history.table-strategy.standard.sharding-algorithm-name=check-input-inline
spring.shardingsphere.rules.sharding.tables.p_check_shot_history.table-strategy.standard.sharding-column=id
spring.shardingsphere.rules.sharding.tables.p_check_shot_history.table-strategy.standard.sharding-algorithm-name=check-shot-inline
#行表达式分片算法
spring.shardingsphere.rules.sharding.sharding-algorithms.task-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.task-inline.props.algorithm-expression=p_plan_task_history_$->{id % 2 + 1}
spring.shardingsphere.rules.sharding.sharding-algorithms.task-detail-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.task-detail-inline.props.algorithm-expression=p_plan_task_detail_history_$->{id % 2 + 1}
spring.shardingsphere.rules.sharding.sharding-algorithms.check-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.check-inline.props.algorithm-expression=p_check_history_$->{id % 2 + 1}
spring.shardingsphere.rules.sharding.sharding-algorithms.check-input-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.check-input-inline.props.algorithm-expression=p_check_input_history_$->{id % 2 + 1}
spring.shardingsphere.rules.sharding.sharding-algorithms.check-shot-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.check-shot-inline.props.algorithm-expression=p_check_shot_history_$->{id % 2 + 1}
# -----分表结束
#是否开启SQL显示,默认值: false
spring.shardingsphere.props.sql-show= false
spring.shardingsphere.props.max-connections-size-per-query=5
shardingsphere.create.tables.num=10
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment