124 lines
4.3 KiB
YAML
124 lines
4.3 KiB
YAML
server:
|
||
port: 8080
|
||
|
||
minio:
|
||
endpoint: https://miniodown.nex.unisspace.com
|
||
access_key: admin
|
||
secret_key: Admin@123456
|
||
bucket: crm
|
||
base_path: uploadPath
|
||
use_ssl: false
|
||
|
||
spring:
|
||
application:
|
||
name: unis-crm-backend
|
||
servlet:
|
||
multipart:
|
||
max-file-size: 500MB
|
||
max-request-size: 600MB
|
||
datasource:
|
||
# 生产 DB / Redis 走 K8s NodePort,空闲连接会被静默回收,需要显式超时兜底
|
||
url: jdbc:postgresql://10.100.51.227:30532/unis_scc?ApplicationName=unis-crm-prod&connectTimeout=10&socketTimeout=120&tcpKeepAlive=true
|
||
username: root
|
||
password: unis@123
|
||
driver-class-name: org.postgresql.Driver
|
||
hikari:
|
||
pool-name: crm-prod
|
||
# 实例 max_connections=100 且与 rda/unis 库共用,池子保持保守
|
||
maximum-pool-size: 10
|
||
minimum-idle: 2
|
||
# 拿不到连接时 10s 快速失败,避免请求线程堆积
|
||
connection-timeout: 10000
|
||
# 连接最长存活 5min,短于 NodePort 空闲连接回收时间
|
||
max-lifetime: 300000
|
||
keepalive-time: 120000
|
||
# 2min 未归还判定为泄漏;阈值留出大文件上传等正常慢操作余量
|
||
leak-detection-threshold: 120000
|
||
# 单条 SQL 60s 上限;事务内空闲 2min 判定为泄漏,避免长事务占锁并阻塞 vacuum
|
||
connection-init-sql: "SET statement_timeout = 60000; SET idle_in_transaction_session_timeout = 120000;"
|
||
data:
|
||
redis:
|
||
host: 10.100.51.227
|
||
port: 30379
|
||
password: unis@123
|
||
database: 10
|
||
# 命令与建连各 5s 超时,Redis 抖动时快速失败而不是挂住线程
|
||
timeout: 5s
|
||
connect-timeout: 5s
|
||
lettuce:
|
||
shutdown-timeout: 500ms
|
||
|
||
mybatis-plus:
|
||
mapper-locations: classpath*:/mapper/**/*.xml
|
||
type-aliases-package: com.unis.crm.dto.dashboard
|
||
configuration:
|
||
map-underscore-to-camel-case: true
|
||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||
|
||
logging:
|
||
level:
|
||
com.unis.crm: info
|
||
|
||
unisbase:
|
||
log:
|
||
enabled: true
|
||
web:
|
||
auth-endpoints-enabled: true
|
||
management-endpoints-enabled: true
|
||
security:
|
||
enabled: true
|
||
mode: embedded
|
||
jwt-secret: change-me-please-change-me-32bytes
|
||
auth-header: Authorization
|
||
token-prefix: "Bearer "
|
||
permit-all-urls:
|
||
- /actuator/health
|
||
- /api/wecom/sso/**
|
||
- /api/opportunities/all
|
||
- /api/opportunities/integration/**
|
||
- /api/oms/callback/order-return
|
||
internal-auth:
|
||
enabled: true
|
||
secret: f0eb247f84db4e328fb27ce8ff6e7be96e73a53a7e9c4793395ad10d999e0d77
|
||
header-name: X-Internal-Secret
|
||
app:
|
||
resource-prefix: /sys/api/static/
|
||
tencent-map:
|
||
key: ${TENCENT_MAP_KEY:LJYBZ-HCQCV-N37PU-5FIOX-QFA26-FPB6U}
|
||
captcha:
|
||
ttl-seconds: 120
|
||
max-attempts: 5
|
||
token:
|
||
access-default-minutes: 10080
|
||
refresh-default-days: 7
|
||
wecom:
|
||
enabled: ${WECOM_ENABLED:false}
|
||
corp-id: ${WECOM_CORP_ID:ww249648b2f76c3ba5}
|
||
agent-id: ${WECOM_AGENT_ID:1000108}
|
||
secret: ${WECOM_SECRET:ngv-x4X1Epy5KcL85B7nhzY-qQkA4FnId9ZZ7Z3s3lQ}
|
||
redirect-uri: ${WECOM_REDIRECT_URI:https://crm.unissense.top/api/wecom/sso/callback}
|
||
frontend-callback-path: ${WECOM_FRONTEND_CALLBACK_PATH:/login/wecom}
|
||
scope: ${WECOM_SCOPE:snsapi_base}
|
||
state-ttl-seconds: 300
|
||
ticket-ttl-seconds: 180
|
||
access-token-safety-seconds: 120
|
||
oms:
|
||
enabled: ${OMS_ENABLED:true}
|
||
base-url: ${OMS_BASE_URL:https://oms.unisspace.com/prod-api}
|
||
api-key: ${OMS_API_KEY:c7f858d0-30b8-4b7f-9ea1-0ccf5ceb1c54}
|
||
api-key-header: ${OMS_API_KEY_HEADER:apiKey}
|
||
user-info-path: ${OMS_USER_INFO_PATH:/api/v1/user/info}
|
||
user-add-path: ${OMS_USER_ADD_PATH:/api/v1/user/add}
|
||
project-add-path: ${OMS_PROJECT_ADD_PATH:/api/v1/project/add}
|
||
pre-sales-role-name: ${OMS_PRE_SALES_ROLE_NAME:售前}
|
||
connect-timeout-seconds: ${OMS_CONNECT_TIMEOUT_SECONDS:5}
|
||
read-timeout-seconds: ${OMS_READ_TIMEOUT_SECONDS:15}
|
||
work-report:
|
||
daily-report:
|
||
# 未命中下方任何角色配置时,是否默认要求日报使用 # 选择并关联对象。
|
||
required-by-default: false
|
||
# 明确要求使用 # 选择并关联对象的角色编码;命中后优先级高于 optional-role-codes。
|
||
required-role-codes: [crm_xs]
|
||
# 允许不使用 #,可直接填写文字日报的角色编码。
|
||
optional-role-codes: []
|