huangxz
2026-03-02 a07c142f438c9c01529a27b7f4da4af99514cea2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
spring:
  config:
    activate:
      on-profile: local
  autoconfigure:
    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
 
  redis:
    database: 99
    host: r-bp1ip8die60uuo3ovypd.redis.rds.aliyuncs.com
    password: syAktm2x9uDusoF_
    port: 6379
  data:
    mongodb:
      host: dds-bp1f4a38f3cccad4-pub.mongodb.rds.aliyuncs.com
      port: 3717
      database: xp_robotaxi
      username: xp_robotaxi
      password: hDXSBe_hs0d5KxUf
  # Kafka 配置
  kafka:
    bootstrap-servers: alikafka-pre-cn-aic4j4ywq028-1-vpc.alikafka.aliyuncs.com:9092,alikafka-pre-cn-aic4j4ywq028-2-vpc.alikafka.aliyuncs.com:9092,alikafka-pre-cn-aic4j4ywq028-3-vpc.alikafka.aliyuncs.com:9092
    consumer:
      group-id: group-robotaxi-xpu
      auto-offset-reset: earliest
      key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      enable-auto-commit: true
      auto-commit-interval: 1000
    producer:
      key-serializer: org.apache.kafka.common.serialization.StringSerializer
      value-serializer: org.apache.kafka.common.serialization.StringSerializer
      retries: 3
      acks: all
    listener:
      concurrency: 3
 
  shardingsphere:
    datasource:
      names: xp0
      xp0:
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://pc-bp1o444934f546768po.rwlb.rds.aliyuncs.com:3306/xp_rt_maintenance?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: xp_rt_maintenance
        password: gWgoAv_bi02um8sN
        druid:
          initial-size: 10
          min-idle: 10
          max-active: 100
          max-wait: 60000
          time-between-eviction-runs-millis: 60000
          min-evictable-idle-time-millis: 300000
          validation-query: SELECT 1
          test-while-idle: true
          test-on-borrow: false
          test-on-return: false
          pool-prepared-statements: true
          max-pool-prepared-statement-per-connection-size: 20
          filters: stat,wall,log4j
          connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
          remove-abandoned: true
          remove-abandoned-timeout: 1800
          log-abandoned: true
          stat-view-servlet:
            enabled: true
            url-pattern: /druid/*
            login-username: admin
            login-password: admin
            reset-enable: false
          wall:
            config:
              multi-statement-allow: false
    rules:
      sharding:
        tables:
          xp_charging_record:
            actual-data-nodes: xp0.xp_charging_record_$->{0..9}
            table-strategy:
              standard:
                sharding-column: vehicle_id
                sharding-algorithm-name: xp-charging-record-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_clock_in:
            actual-data-nodes: xp0.xp_clock_in_$->{0..9}
            table-strategy:
              standard:
                sharding-column: app_user_id
                sharding-algorithm-name: xp-clock-in-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_task:
            actual-data-nodes: xp0.xp_task_$->{0..19}
            table-strategy:
              standard:
                sharding-column: vehicle_id
                sharding-algorithm-name: xp-task-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_task_handle_detail:
            actual-data-nodes: xp0.xp_task_handle_detail_$->{0..19}
            table-strategy:
              standard:
                sharding-column: task_id
                sharding-algorithm-name: xp-task-handle-detail-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_task_handle_detail_routine:
            actual-data-nodes: xp0.xp_task_handle_detail_routine_$->{0..19}
            table-strategy:
              standard:
                sharding-column: task_id
                sharding-algorithm-name: xp-task-handle-detail-routine-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_vehicle_detection:
            actual-data-nodes: xp0.xp_vehicle_detection_$->{0..9}
            table-strategy:
              standard:
                sharding-column: task_id
                sharding-algorithm-name: xp-vehicle-detection-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_vehicle_preparation:
            actual-data-nodes: xp0.xp_vehicle_preparation_$->{0..9}
            table-strategy:
              standard:
                sharding-column: task_id
                sharding-algorithm-name: xp-vehicle-preparation-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_vehicle_repair:
            actual-data-nodes: xp0.xp_vehicle_repair_$->{0..9}
            table-strategy:
              standard:
                sharding-column: task_id
                sharding-algorithm-name: xp-vehicle-repair-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_work_order:
            actual-data-nodes: xp0.xp_work_order_$->{0..9}
            table-strategy:
              standard:
                sharding-column: feedback_user_phone
                sharding-algorithm-name: xp-work-order-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
          xp_work_order_log:
            actual-data-nodes: xp0.xp_work_order_log_$->{0..19}
            table-strategy:
              standard:
                sharding-column: work_order_id
                sharding-algorithm-name: xp-work-order-log-inline
            key-generate-strategy:
              column: id
              key-generator-name: snowflakeKeyGen
        sharding-algorithms:
          xp-charging-record-inline:
            type: INLINE
            props:
              algorithm-expression: xp_charging_record_${vehicle_id % 20}
          xp-clock-in-inline:
            type: INLINE
            props:
              algorithm-expression: xp_clock_in_${app_user_id % 10}
          xp-task-inline:
            type: INLINE
            props:
              algorithm-expression: xp_task_${vehicle_id % 20}
          xp-task-handle-detail-inline:
            type: INLINE
            props:
              algorithm-expression: xp_task_handle_detail_${task_id % 20}
          xp-task-handle-detail-routine-inline:
            type: INLINE
            props:
              algorithm-expression: xp_task_handle_detail_routine_${task_id % 20}
          xp-vehicle-detection-inline:
            type: INLINE
            props:
              algorithm-expression: xp_vehicle_detection_${task_id % 10}
          xp-vehicle-preparation-inline:
            type: INLINE
            props:
              algorithm-expression: xp_vehicle_preparation_${task_id % 10}
          xp-vehicle-repair-inline:
            type: INLINE
            props:
              algorithm-expression: xp_vehicle_repair_${task_id % 10}
          xp-work-order-inline:
            type: INLINE
            props:
              algorithm-expression: xp_work_order_${feedback_user_phone % 10}
          xp-work-order-log-inline:
            type: INLINE
            props:
              algorithm-expression: xp_work_order_log_${work_order_id % 20}
        key-generators:
          snowflakeKeyGen:
            type: SNOWFLAKE
      single-table:
        default-data-source-name: xp0
    props:
      sql-show: true
      sql-simple: true
 
# XPU
xpu:
  topic: topic-prod-xpu-robotaxi-high
 
# swagger配置
swagger:
  title: 自动驾驶模块接口文档
  enabled: true
  license: Powered By xiaopeng
  licenseUrl: http://127.0.0.1:5800/doc.html
 
# snowflake 配置
snowflake:
  worker-id: -1
  data-center-id: 0
 
seata:
  enabled: false
  application-id: ${spring.application.name}
  tx-service-group: seata_tx_group
  enable-auto-data-source-proxy: false
  service:
    vgroup-mapping:
      seata_tx_group: default
  data-source-proxy-mode: AT
  config:
    type: nacos
    nacos:
      server-addr: 192.168.110.80:8848
      namespace: 5185ac4b-6369-48eb-a21b-a7cbc441c5f1
      group: DEFAULT_GROUP
      data-id: seata-server.properties
      username: nacos
      password: nacos
 
robotaxi:
  sms:
    whitelist:
      mobiles: 13800138000
 
logging:
  pattern:
    console: "%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr([%X{traceId:-}]){yellow} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wEx"
  level:
    org.apache.kafka: ERROR
    # feign FULL 级别日志:打印请求头、响应头、请求body、响应body
    com.xiaopeng.api.feignClient: DEBUG
    com.xiaopeng.unifiedverification.remote.feign: DEBUG
    # 系统收到的请求/响应日志
    org.springframework.web.filter.CommonsRequestLoggingFilter: DEBUG
 
feign:
  client:
    config:
      default:
        loggerLevel: FULL