李学强 il y a 6 mois
Parent
commit
a6755f88d8

+ 1 - 1
kxs-admin/pom.xml

@@ -4,7 +4,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <artifactId>kxs</artifactId>
+        <artifactId>kxs-boot</artifactId>
         <groupId>com.kxs</groupId>
         <version>3.5.9</version>
     </parent>

+ 95 - 0
kxs-admin/src/main/resources/application.yml

@@ -0,0 +1,95 @@
+server:
+  port: 8080
+  servlet:
+    context-path: /v1/admin
+
+spring:
+  application:
+    name: ${artifactId}
+  profiles:
+    active: @profiles.active@
+
+  main:
+    allow-bean-definition-overriding: true
+  cache:
+    type: redis
+    repositories:
+      enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度\
+  # Servlet 配置
+  servlet:
+    # 文件上传相关配置项
+    multipart:
+      max-file-size: 16MB # 单个文件大小
+      max-request-size: 32MB # 设置总上传的文件大小
+
+security:
+  oauth2:
+    ignore:
+      urls:
+        - /pay/payBack/**
+        - /cash/cashBack/**
+
+gateway:
+  aes:
+    enabled: false
+    encode-key: 'CBTU1dD4Kd5pyiGWTsI10jRQ3SvKusSV'
+    encode-iv: 'DYgjCEIMVrj2W9xN'
+    encode-mode: 'CBC'
+    encode-padding: 'PKCS7Padding'
+    filter-url:
+      - /code
+  #不校验验证码的客户端
+  ignore-clients:
+    - admin
+
+# swagger 配置
+swagger:
+  enabled: false
+  title: LXQ API
+  gateway: http://${GATEWAY_HOST:localhost}:${GATEWAY-PORT:8080}
+  token-url: ${swagger.gateway}/v1/lxq/oauth2/token
+  scope: server
+  services:
+    lxq-admin-biz: admin
+
+
+file:
+  oss:
+    bucket-name: lxq-uni-bucket
+    file-prefix: lxq_uni
+    endpoint: oss-cn-chengdu.aliyuncs.com
+    accessKey: LTAI5tFQDZmc4ybRYembzVMb
+    secretKey: c7rEI6VrokQ3KtgMnDTS0ltjG47BEx
+    file-url: https://oss-cn-chengdu.aliyuncs.com/
+
+# mybaits-plus配置
+mybatis-plus:
+  mapper-locations: classpath*:/mapper/*.xml,classpath:mapper/*/*.xml
+  global-config:
+    banner: false # 关闭控制台的 Banner 打印
+    db-config:
+      id-type: auto
+      table-underline: true
+      logic-delete-value: 1  # 逻辑已删除值(默认为 1)
+      logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+  type-handlers-package: com.kxs.common.mybatis.handler
+  configuration:
+    map-underscore-to-camel-case: true
+    shrink-whitespaces-in-sql: true
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志
+
+  encryptor:
+    password: DYgjCEIMVrj2W9xN
+mybatis-plus-join:
+  #是否打印 mybatis plus join banner 默认true
+  banner: false
+  #全局启用副表逻辑删除(默认true) 关闭后关联查询不会加副表逻辑删除
+  sub-table-logic: true
+  #拦截器MappedStatement缓存(默认true)
+  ms-cache: true
+  #表别名(默认 t)
+  table-alias: t
+  #副表逻辑删除条件的位置,支持where、on
+  #默认ON (1.4.7.2及之前版本默认为where)
+  logic-del-type: on
+

+ 1 - 1
kxs-common/pom.xml

@@ -6,7 +6,7 @@
 
     <parent>
         <groupId>com.kxs</groupId>
-        <artifactId>kxs</artifactId>
+        <artifactId>kxs-boot</artifactId>
         <version>3.5.9</version>
     </parent>
 

+ 1 - 1
kxs-quartz/pom.xml

@@ -4,7 +4,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <groupId>com.kxs</groupId>
-        <artifactId>kxs</artifactId>
+        <artifactId>kxs-boot</artifactId>
         <version>3.5.9</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
kxs-system/pom.xml

@@ -4,7 +4,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <artifactId>kxs</artifactId>
+        <artifactId>kxs-boot</artifactId>
         <groupId>com.kxs</groupId>
         <version>3.5.9</version>
     </parent>

+ 46 - 0
kxs-system/src/main/resources/application-dev.yml

@@ -0,0 +1,46 @@
+spring:
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    dynamic:
+      primary: main
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      datasource:
+        main:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          username: root
+          password: root
+          url: jdbc:mysql://kxs-mysql:3306/lxq_system?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+    #hikari数据源特性配置
+    hikari:
+      maximum-pool-size: 10 #最大连接数,默认值10.
+      minimum-idle: 10 #最小空闲连接,默认值10.
+      connection-timeout: 60000 #连接超时时间(毫秒),默认值30秒.
+      #空闲连接超时时间,默认值600000(10分钟),只有空闲连接数大于最大连接数且空闲时间超过该值,才会被释放
+      #如果大于等于 max-lifetime 且 max-lifetime>0,则会被重置为0.
+      idle-timeout: 600000
+      max-lifetime: 3000000 #连接最大存活时间,默认值30分钟.设置应该比mysql设置的超时时间短
+      connection-test-query: select 1 #连接测试查询
+  data:
+    redis:
+      host: kxs-redis
+  rabbitmq:
+    host: kxs-rabbitmq
+    port: 5672
+    username: admin
+    password: admin
+    publisher-confirm-type: correlated #消息发送成功交互
+    publisher-returns: true
+    listener:
+      simple:
+        # 重试机制
+        retry:
+          enabled: true #是否开启消费者重试
+          max-attempts: 3 #最大重试次数
+          initial-interval: 5000ms #重试间隔时间(单位毫秒)
+          max-interval: 1200000ms #重试最大时间间隔(单位毫秒)
+          # 乘子。间隔时间*乘子=下一次的间隔时间,不能超过max-interval
+          # 以本处为例:第一次间隔 5 秒,第二次间隔 10 秒,以此类推
+          multiplier: 2
+
+
+

+ 21 - 0
kxs-system/src/main/resources/application-prod.yml

@@ -0,0 +1,21 @@
+
+spring:
+  cloud:
+    nacos:
+      username: @nacos.username@
+      password: @nacos.password@
+      discovery:
+        server-addr: ${NACOS_HOST:mse-78d0edb13-nacos-ans.mse.aliyuncs.com}:${NACOS_PORT:8848}
+        watch:
+          enabled: true
+        watch-delay: 1000
+        metadata:
+          preserved.heart.beat.interval: 1000
+          preserved.heart.beat.timeout: 3000
+          preserved.ip.delete.timeout: 3000
+      config:
+        server-addr: ${spring.cloud.nacos.discovery.server-addr}
+  config:
+    import:
+      - optional:nacos:application-@profiles.active@.yml
+      - optional:nacos:${spring.application.name}-@profiles.active@.yml

+ 19 - 0
kxs-system/src/main/resources/application-test.yml

@@ -0,0 +1,19 @@
+
+spring:
+  cloud:
+    nacos:
+      username: @nacos.username@
+      password: @nacos.password@
+      discovery:
+        server-addr: nacos.default.svc.cluster.local:8848
+        namespace: 68400b62-95c0-4593-a7c2-63d9857736ed
+        watch:
+          enabled: true
+        watch-delay: 1000
+      config:
+        server-addr: nacos.default.svc.cluster.local:8848
+        namespace: 68400b62-95c0-4593-a7c2-63d9857736ed
+  config:
+    import:
+      - optional:nacos:application-@profiles.active@.yml
+      - optional:nacos:${spring.application.name}-@profiles.active@.yml

+ 1 - 1
pom.xml

@@ -4,7 +4,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>com.kxs</groupId>
-    <artifactId>kxs</artifactId>
+    <artifactId>kxs-boot</artifactId>
     <name>${project.artifactId}</name>
     <version>3.5.9</version>
     <packaging>pom</packaging>