xiangpei
2025-05-19 ad2fc69d87a8ba4d2f4b248e571b7207bdd9261e
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
apiVersion: v1
kind: Namespace
metadata:
  name: lilishop-service
 
---
apiVersion: v1
kind: Service
metadata:
  name: buyer-api-service
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: buyer-api-service
    app.kubernetes.io/instance: api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  type: NodePort
  ports:
    - name: "8888"
      nodePort: 30888
      port: 8888
      targetPort: buyer8888
  selector:
    lilishop.service: buyer-api
 
---
apiVersion: v1
kind: Service
metadata:
  name: common-api-service
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: common-api-service
    app.kubernetes.io/instance: api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  type: NodePort
  ports:
    - name: "8890"
      nodePort: 30890
      port: 8890
      targetPort: common8890
  selector:
    lilishop.service: common-api
 
---
apiVersion: v1
kind: Service
metadata:
  name: seller-api-service
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: seller-api-service
    app.kubernetes.io/instance: api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  type: NodePort
  ports:
    - name: "8889"
      nodePort: 30889
      port: 8889
      targetPort: seller8889
  selector:
    lilishop.service: seller-api
 
---
apiVersion: v1
kind: Service
metadata:
  name: manager-api-service
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: manager-api-service
    app.kubernetes.io/instance: api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  type: NodePort
  ports:
    - name: "8887"
      nodePort: 30887
      port: 8887
      targetPort: manager8887
  selector:
    lilishop.service: manager-api
 
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: api-config
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: mysql-db-config
    app.kubernetes.io/instance: mysql-single
    app.kubernetes.io/version: "8.0.28"
    app.kubernetes.io/component: database
    app.kubernetes.io/part-of: lilishop
data:
  application.yml: |
    server:
      servlet:
        context-path: /
 
      tomcat:
        uri-encoding: UTF-8
        threads:
          min-spare: 50
          max: 1000
 
    # 与Spring Boot 2一样,默认情况下,大多数端点都不通过http公开,我们公开了所有端点。对于生产,您应该仔细选择要公开的端点。
    management:
      #  health:
      #    elasticsearch:
      #      enabled: false
      #    datasource:
      #      enabled: false
      endpoints:
        web:
          exposure:
            include: '*'
    spring:
      # 要在其中注册的Spring Boot Admin Server的URL。
      boot:
        admin:
          client:
            url: http://192.168.0.116:8000
      cache:
        type: redis
      # Redis
      redis:
        host: redis-service.lilishop-middleware
        port: 6379
        password: lilishop
        lettuce:
          pool:
            # 连接池最大连接数(使用负值表示没有限制) 默认 8
            max-active: 200
            # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1
            max-wait: 20
            # 连接池中的最大空闲连接 默认 8
            max-idle: 10
            # 连接池中的最小空闲连接 默认 8
            min-idle: 8
      # 文件大小上传配置
      servlet:
        multipart:
          max-file-size: 20MB
          max-request-size: 20MB
      jackson:
        time-zone: GMT+8
        serialization:
          #关闭jackson 对json做解析
          fail-on-empty-beans: false
 
      shardingsphere:
        datasource:
          #  数据库名称,可自定义,可以为多个,以逗号隔开,每个在这里定义的库,都要在下面定义连接属性
          names: default-datasource
          default-datasource:
            type: com.alibaba.druid.pool.DruidDataSource
            driverClassName: com.mysql.cj.jdbc.Driver
            url: jdbc:mysql://mysql.lilishop-middleware:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
            username: root
            password: lilishop
            maxActive: 50
            initialSize: 20
            maxWait: 60000
            minIdle: 5
            timeBetweenEvictionRunsMillis: 60000
            minEvictableIdleTimeMillis: 300000
            validationQuery: SELECT 1 FROM DUAL
            testWhileIdle: true
            testOnBorrow: false
            testOnReturn: false
            #是否缓存preparedStatement,也就是PSCache。在mysql下建议关闭。 PSCache对支持游标的数据库性能提升巨大,比如说oracle。
            poolPreparedStatements: false
            #要启用PSCache,-1为关闭 必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true  可以把这个数值配置大一些,比如说100
            maxOpenPreparedStatements: -1
            #配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
            filters: stat,wall,log4j2
            #通过connectProperties属性来打开mergeSql功能;慢SQL记录
            connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
            #合并多个DruidDataSource的监控数据
            useGlobalDataSourceStat: true
            loginUsername: druid
            loginPassword: druid
        #    sharding:
        #      default-data-source-name: default-datasource
        #      #需要拆分的表,可以设置多个  在 li_order 级别即可
        #      tables:
        #        #需要进行分表的逻辑表名
        #        li_order:
        #          #实际的表结点,下面代表的是li_order_为开头的所有表,如果能确定表的范围例如按月份分表,这里的写法是data2020.li_order_$->{2020..2021}_$->{01..12}  表示例如 li_order_2020_01 li_order_2020_03 li_order_2021_01
        #          actual-data-nodes: data2020.li_order_$->{2019..2021}_$->{01..12}
        #          table-strategy:
        #            # 分表策略,根据创建日期
        #            standard:
        #              sharding-column: create_time
        #              #分表策略
        #              precise-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
        #              #范围查询实现
        #              range-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
        props:
          #是否打印逻辑SQL语句和实际SQL语句,建议调试时打印,在生产环境关闭
          sql:
            show: true
 
    # 忽略鉴权url
    ignored:
      urls:
        - /editor-app/**
        - /actuator**
        - /actuator/**
        - /MP_verify_qSyvBPhDsPdxvOhC.txt
        - /weixin/**
        - /source/**
        - /store/passport/login/**
        - /store/passport/login/refresh/**
        - /common/common/slider/**
        - /common/common/sms/**
        - /buyer/payment/cashier/**
        - /buyer/other/pageData/**
        - /buyer/other/article/**
        - /buyer/goods/**
        - /buyer/store/**
        - /buyer/passport/connect/**
        - /buyer/members/**
        - /buyer/passport/member/**
        - /buyer/passport/member/refresh/**
        - /buyer/promotion/pintuan/**
        - /buyer/promotion/seckill/**
        - /buyer/promotion/pointsGoods/**
        - /buyer/promotion/coupon
        - /buyer/member/evaluation/**/goodsEvaluation
        - /buyer/member/evaluation/**/evaluationNumber
        - /buyer/other/appVersion/**
        - /buyer/broadcast/studio/**
        - /manager/passport/user/login
        - /manager/passport/user/refresh/**
        - /manager/other/elasticsearch
        - /manager/other/customWords
        - /druid/**
        - /swagger-ui.html
        - /doc.html
        - /swagger-resources/**
        - /swagger/**
        - /webjars/**
        - /v2/api-docs**
        - /configuration/ui
        - /boot-admin
        - /manager/promotion/seckill/init
        - /**/*.js
        - /**/*.css
        - /**/*.png
        - /**/*.ico
 
    # Swagger界面内容配置
    swagger:
      title: lilishop API接口文档
      description: lilishop Api Documentation
      version: 4.2.2
      termsOfServiceUrl: https://pickmall.cn
      contact:
        name: lili
        url: https://pickmall.cn
        email: admin@pickmall.com
 
    # Mybatis-plus
    mybatis-plus:
      mapper-locations: classpath*:mapper/*.xml
      configuration:
        #缓存开启
        cache-enabled: true
        #日志
    #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 
    # 日志
    logging:
      # 输出级别
      level:
        cn.lili: info
      #    org.hibernate: debug
      #    org.springframework: debug
      file:
        # 指定路径
        path: logs
      logback:
        rollingpolicy:
          # 最大保存天数
          max-history: 7
          # 每个文件最大大小
          max-file-size: 5MB
    #加密参数
    jasypt:
      encryptor:
        password: lili
 
 
    lili:
      #验证码设置
      verification-code:
        #图形验证码有效时间 秒 包含滑块验证码有效时间, 以及验证通过之后,缓存中存储的验证结果有效时间
        effectiveTime: 300
        #水印
        watermark: LILI-SHOP
        #干扰项数量 最大2 默认0
        interfereNum: 1
        #允许误差像素
        faultTolerant: 3
      #短信模版配置
      sms:
        #登录
        LOGIN: SMS_205755300
        #注册
        REGISTER: SMS_205755298
        #找回密码
        FIND_USER: SMS_205755301
        #设置密码
        UPDATE_PASSWORD: SMS_205755297
        #支付密码
        WALLET_PASSWORD: SMS_205755301
      system:
        isDemoSite: false
        isTestModel: true
      #     脱敏级别:
      #     0:不做脱敏处理
      #     1:管理端用户手机号等信息脱敏
      #     2:商家端信息脱敏(为2时,表示管理端,商家端同时脱敏)
        sensitiveLevel: 1
 
      statistics:
        # 在线人数统计 X 小时。这里设置48,即统计过去48小时每小时在线人数
        onlineMember: 48
        # 当前在线人数刷新时间间隔,单位秒,设置为600,则每10分钟刷新一次
        currentOnlineUpdate: 600
      #qq lbs 申请
      lbs:
        key: 4BYBZ-7MT6S-PUAOA-6BNWL-FJUD7-UUFXT
        sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
      #域名
      domain:
        pc: http://192.168.0.116:8888
        wap: http://192.168.0.116:8888
        seller: http://192.168.0.116:8888
        admin: http://192.168.0.116:8888
      #api地址
      api:
        buyer: http://192.168.0.116:8888
        base: http://192.168.0.116:8888
        manager: http://192.168.0.116:8888
        seller: http://192.168.0.116:8888
 
      # jwt 细节设定
      jwt-setting:
        # token过期时间(分钟)
        tokenExpireTime: 30
 
      # 使用Spring @Cacheable注解失效时间
      cache:
        # 过期时间 单位秒 永久不过期设为-1
        timeout: 1500
      #多线程配置
      thread:
        corePoolSize: 5
        maxPoolSize: 50
        queueCapacity: 50
      data:
        elasticsearch:
          cluster-name: elasticsearch
          cluster-nodes: elasticsearch.lilishop-middleware:9200
          index:
            number-of-replicas: 0
            number-of-shards: 3
          index-prefix: lili
          schema: http
        #      account:
        #        username: elastic
        #        password: LiLiShopES
 
        logstash:
          server: logstash-service.lilishop-middleware:4560
        rocketmq:
          promotion-topic: lili_promotion_topic
          promotion-group: lili_promotion_group
          msg-ext-topic: lili_msg_topic
          msg-ext-group: lili_msg_group
          goods-topic: lili_goods_topic
          goods-group: lili_goods_group
          order-topic: lili_order_topic
          order-group: lili_order_group
          member-topic: lili_member_topic
          member-group: lili_member_group
          other-topic: lili_other_topic
          other-group: lili_other_group
          notice-topic: lili_notice_topic
          notice-group: lili_notice_group
          notice-send-topic: lili_send_notice_topic
          notice-send-group: lili_send_notice_group
          after-sale-topic: lili_after_sale_topic
          after-sale-group: lili_after_sale_group
    rocketmq:
      name-server: rocketmq.lilishop-middleware:9876
      isVIPChannel: false
      producer:
        group: lili_group
        send-message-timeout: 30000
 
    xxl:
      job:
        admin:
          addresses: http://xxl-job-service.lilishop-middleware:9001/xxl-job-admin
        executor:
          appname: xxl-job-executor-lilishop
          address:
          ip:
          port: 8891
          logpath: ./xxl-job/executor
          logretentiondays: 7
 
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: buyer-api
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: buyer-api-service
    app.kubernetes.io/instance: buyer-api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  replicas: 1
  selector:
    matchLabels:
      lilishop.service: buyer-api
  template:
    metadata:
      labels:
        lilishop.service: buyer-api
    spec:
      containers:
        - image: 192.168.0.108:31320/buyer-api:4.2.4.1
          name: buyer-api
          env:
            - name: TZ
              value: Asia/Shanghai
            - name: JAVA_OPTS
              value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC
          ports:
            - name: buyer8888
              containerPort: 8888
          volumeMounts:
            - mountPath: /application.yml
              name: application-yml
              subPath: application.yml
      restartPolicy: Always
      volumes:
        - configMap:
            name: api-config
          name: application-yml
 
 
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: common-api
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: common-api-service
    app.kubernetes.io/instance: common-api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  replicas: 1
  selector:
    matchLabels:
      lilishop.service: common-api
  template:
    metadata:
      labels:
        lilishop.service: common-api
    spec:
      containers:
        - image: 192.168.0.108:31320/common-api:4.2.4.1
          name: common-api
          env:
            - name: TZ
              value: Asia/Shanghai
            - name: JAVA_OPTS
              value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC
          ports:
            - name: common8890
              containerPort: 8890
          volumeMounts:
            - mountPath: /application.yml
              name: application-yml
              subPath: application.yml
      restartPolicy: Always
      volumes:
        - configMap:
            name: api-config
          name: application-yml
 
 
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: seller-api
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: seller-api-service
    app.kubernetes.io/instance: seller-api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  replicas: 1
  selector:
    matchLabels:
      lilishop.service: seller-api
  template:
    metadata:
      labels:
        lilishop.service: seller-api
    spec:
      containers:
        - image: 192.168.0.108:31320/seller-api:4.2.4.1
          name: seller-api
          env:
            - name: TZ
              value: Asia/Shanghai
            - name: JAVA_OPTS
              value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC
          ports:
            - name: seller8889
              containerPort: 8889
          volumeMounts:
            - mountPath: /application.yml
              name: application-yml
              subPath: application.yml
      restartPolicy: Always
      volumes:
        - configMap:
            name: api-config
          name: application-yml
 
 
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: manager-api
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: manager-api-service
    app.kubernetes.io/instance: manager-api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  replicas: 1
  selector:
    matchLabels:
      lilishop.service: manager-api
  template:
    metadata:
      labels:
        lilishop.service: manager-api
    spec:
      containers:
        - image: 192.168.0.108:31320/manager-api:4.2.4.1
          name: manager-api
          env:
            - name: TZ
              value: Asia/Shanghai
            - name: JAVA_OPTS
              value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC
          ports:
            - name: manager8887
              containerPort: 8887
          volumeMounts:
            - mountPath: /application.yml
              name: application-yml
              subPath: application.yml
      restartPolicy: Always
      volumes:
        - configMap:
            name: api-config
          name: application-yml
 
 
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: consumer
  namespace: lilishop-service
  labels:
    app.kubernetes.io/name: consumer-service
    app.kubernetes.io/instance: buyer-api
    app.kubernetes.io/version: "4.2.4.1"
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: lilishop
    tier: "api-service"
spec:
  replicas: 1
  selector:
    matchLabels:
      lilishop.service: consumer
  template:
    metadata:
      labels:
        lilishop.service: consumer
    spec:
      containers:
        - image: 192.168.0.108:31320/consumer:4.2.4.1
          name: consumer
          env:
            - name: TZ
              value: Asia/Shanghai
            - name: JAVA_OPTS
              value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC
          volumeMounts:
            - mountPath: /application.yml
              name: application-yml
              subPath: application.yml
      restartPolicy: Always
      volumes:
        - configMap:
            name: api-config
          name: application-yml