配置:统一后端参数由Nacos明文管理
This commit is contained in:
@@ -1,138 +1 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/jayucloud_artlist?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 5MB
|
||||
max-request-size: 10MB
|
||||
jackson:
|
||||
time-zone: Asia/Shanghai
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
|
||||
logging:
|
||||
pattern:
|
||||
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
||||
|
||||
server:
|
||||
servlet:
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
force: true
|
||||
enabled: true
|
||||
timezone: Asia/Shanghai
|
||||
|
||||
mybatis:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
|
||||
fingertip-designer:
|
||||
brand:
|
||||
message-template-name: ${PLATFORM_MESSAGE_TEMPLATE_NAME:FingertipDesigner}
|
||||
manager-register-shop-description: ${PLATFORM_MANAGER_REGISTER_SHOP_DESCRIPTION:甲屿店务注册店铺}
|
||||
security:
|
||||
jwt:
|
||||
issuer: fingertip-designer
|
||||
access-token-expiration-seconds: 7200
|
||||
remember-me-access-token-expiration-seconds: 604800
|
||||
refresh-token-expiration-seconds: 604800
|
||||
clock-skew-seconds: 30
|
||||
signature:
|
||||
enabled: true
|
||||
window-seconds: 300
|
||||
nonce-retention-seconds: 600
|
||||
rate-limit:
|
||||
login:
|
||||
limit: 10
|
||||
window-seconds: 60
|
||||
send-code:
|
||||
limit: 5
|
||||
window-seconds: 60
|
||||
reset-password:
|
||||
limit: 5
|
||||
window-seconds: 600
|
||||
authenticated-write:
|
||||
limit: 80
|
||||
window-seconds: 60
|
||||
order-create:
|
||||
limit: 10
|
||||
window-seconds: 60
|
||||
cache:
|
||||
local-max-size: 2048
|
||||
product-detail:
|
||||
local-ttl-seconds: 120
|
||||
redis-ttl-seconds: 900
|
||||
product-list:
|
||||
local-ttl-seconds: 60
|
||||
redis-ttl-seconds: 300
|
||||
product-search:
|
||||
local-ttl-seconds: 60
|
||||
redis-ttl-seconds: 300
|
||||
shop:
|
||||
local-ttl-seconds: 180
|
||||
redis-ttl-seconds: 900
|
||||
tag:
|
||||
local-ttl-seconds: 300
|
||||
redis-ttl-seconds: 1200
|
||||
object-storage-file:
|
||||
local-ttl-seconds: 300
|
||||
redis-ttl-seconds: 1800
|
||||
dashboard:
|
||||
local-ttl-seconds: 30
|
||||
redis-ttl-seconds: 90
|
||||
slow-request:
|
||||
enabled: true
|
||||
threshold-ms: 300
|
||||
log-response-header-request-id: true
|
||||
http-client:
|
||||
connect-timeout-ms: 3000
|
||||
read-timeout-ms: 5000
|
||||
connection-request-timeout-ms: 1000
|
||||
max-total-connections: 200
|
||||
max-connections-per-route: 50
|
||||
|
||||
object-storage:
|
||||
provider-order:
|
||||
- MINIO
|
||||
- QINIU_KODO
|
||||
- ALIYUN_OSS
|
||||
replica-required-providers:
|
||||
- MINIO
|
||||
- QINIU_KODO
|
||||
- ALIYUN_OSS
|
||||
primary-provider: MINIO
|
||||
backup-provider: QINIU_KODO,ALIYUN_OSS
|
||||
signed-url-expire-minutes: 60
|
||||
backup-queue-name: fingertip-designer.file.object-storage.backup.queue
|
||||
backup-exchange-name: fingertip-designer.file.object-storage.backup.exchange
|
||||
backup-routing-key: fingertip-designer.file.object-storage.backup
|
||||
backup-retry-batch-limit: 500
|
||||
backup-retry-cron: "0 0 2 * * ?"
|
||||
|
||||
qiniu:
|
||||
kodo:
|
||||
access-key: ${QINIU_KODO_ACCESS_KEY:}
|
||||
secret-key: ${QINIU_KODO_SECRET_KEY:}
|
||||
bucket-name: ${QINIU_KODO_BUCKET_NAME:}
|
||||
domain: ${QINIU_KODO_DOMAIN:}
|
||||
zone: ${QINIU_KODO_ZONE:z2}
|
||||
private-bucket: ${QINIU_KODO_PRIVATE_BUCKET:true}
|
||||
signed-url-expire-minutes: ${QINIU_KODO_SIGNED_URL_EXPIRE_MINUTES:60}
|
||||
|
||||
minio:
|
||||
enabled: ${MINIO_ENABLED:false}
|
||||
endpoint: ${MINIO_ENDPOINT:}
|
||||
bucket-name: ${MINIO_BUCKET_NAME:}
|
||||
access-key: ${MINIO_ACCESS_KEY:}
|
||||
secret-key: ${MINIO_SECRET_KEY:}
|
||||
private-bucket: ${MINIO_PRIVATE_BUCKET:true}
|
||||
signed-url-expire-minutes: ${MINIO_SIGNED_URL_EXPIRE_MINUTES:60}
|
||||
|
||||
aliyun:
|
||||
oss:
|
||||
enabled: ${ALIYUN_OSS_ENABLED:false}
|
||||
endpoint: ${ALIYUN_OSS_ENDPOINT:}
|
||||
region: ${ALIYUN_OSS_REGION:}
|
||||
bucket-name: ${ALIYUN_OSS_BUCKET_NAME:}
|
||||
access-key-id: ${ALIYUN_OSS_ACCESS_KEY_ID:}
|
||||
access-key-secret: ${ALIYUN_OSS_ACCESS_KEY_SECRET:}
|
||||
signed-url-expire-minutes: ${ALIYUN_OSS_SIGNED_URL_EXPIRE_MINUTES:60}
|
||||
# 除 bootstrap.yaml 中的 Nacos 启动引导参数外,后端运行参数统一由 Nacos 配置源管理。
|
||||
|
||||
@@ -5,29 +5,29 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# Nacos 集群地址,默认指向开发环境,生产环境通过环境变量覆盖。
|
||||
server-addr: ${NACOS_SERVER_ADDR:192.168.10.11:8848,192.168.10.12:8848,192.168.10.13:8848}
|
||||
# Nacos 命名空间,默认指向开发环境。
|
||||
namespace: ${NACOS_NAMESPACE:jayucloud-artlist}
|
||||
# Nacos 启动引导地址固定指向开发配置中心。
|
||||
server-addr: 192.168.5.15:8848
|
||||
# Nacos 启动引导命名空间。
|
||||
namespace: jayucloud-artlist
|
||||
# 服务注册分组。
|
||||
group: DEFAULT_GROUP
|
||||
# 注册到 Nacos 的服务名。
|
||||
service: ${spring.application.name}
|
||||
service: jc-artlist-core
|
||||
# 是否启用服务发现。
|
||||
enabled: true
|
||||
# 是否将当前服务注册到 Nacos。
|
||||
register-enabled: true
|
||||
# Nacos 认证用户名。
|
||||
username: ${NACOS_USERNAME}
|
||||
username: jayucloud
|
||||
# Nacos 认证密码。
|
||||
password: ${NACOS_PASSWORD}
|
||||
password: 122503wcy....
|
||||
config:
|
||||
# Nacos 配置中心地址,与服务发现使用同一组集群节点,默认指向开发环境。
|
||||
server-addr: ${NACOS_SERVER_ADDR:192.168.10.11:8848,192.168.10.12:8848,192.168.10.13:8848}
|
||||
# Nacos 配置中心命名空间,默认指向开发环境。
|
||||
namespace: ${NACOS_NAMESPACE:jayucloud-artlist}
|
||||
# Nacos 配置中心地址,与服务发现使用同一开发节点。
|
||||
server-addr: 192.168.5.15:8848
|
||||
# Nacos 配置中心命名空间。
|
||||
namespace: jayucloud-artlist
|
||||
# 配置分组。
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
group: DEFAULT_GROUP
|
||||
# Core 服务独有配置文件。
|
||||
name: core
|
||||
# 所有 Nacos 配置均使用 YAML。
|
||||
@@ -35,17 +35,17 @@ spring:
|
||||
# 是否启用配置中心。
|
||||
enabled: true
|
||||
# Nacos 认证用户名。
|
||||
username: ${NACOS_USERNAME}
|
||||
username: jayucloud
|
||||
# Nacos 认证密码。
|
||||
password: ${NACOS_PASSWORD}
|
||||
password: 122503wcy....
|
||||
# Core 与 Gateway 共享的公共配置文件。
|
||||
shared-configs:
|
||||
- data-id: infra.yaml
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
group: DEFAULT_GROUP
|
||||
refresh: true
|
||||
- data-id: secret.yaml
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
group: DEFAULT_GROUP
|
||||
refresh: true
|
||||
- data-id: logging.yaml
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
group: DEFAULT_GROUP
|
||||
refresh: true
|
||||
|
||||
Reference in New Issue
Block a user