Files
novel_dev_team_novel/src/main/resources/application.yml
xiongxiaoyang e5592b85dd feat: 集成 Spring AMQP,使用 RabbitMQ 发送小说更新消息
默认关闭,通过 spring.rabbitmq.enable 配置属性来开启
2022-05-25 09:39:25 +08:00

93 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

spring:
profiles:
active: dev
# 将所有数字转为 String 类型返回,避免前端数据精度丢失的问题
jackson:
generator:
write-numbers-as-strings: true
servlet:
# 上传文件最大大小
multipart:
max-file-size: 5MB
server:
port: 8888
---
spring:
datasource:
url: jdbc:mysql://localhost:3306/novel_test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: test123456
config:
activate:
on-profile: dev
---
spring:
# Redis 配置
redis:
host: 127.0.0.1
port: 6379
password: 123456
config:
activate:
on-profile: dev
# Elasticsearch 配置
elasticsearch:
# 是否开启 elasticsearch 搜索引擎功能true-开启 false-不开启
enable: false
uris:
- https://my-deployment-ce7ca3.es.us-central1.gcp.cloud.es.io:9243
username: elastic
password: qTjgYVKSuExX6tWAsDuvuvwl
amqp:
# 是否开启 Spring AMQPtrue-开启 false-不开启
enable: false
# RabbitMQ 配置
rabbitmq:
addresses: "amqp://guest:guest@47.106.243.172"
virtual-host: novel
template:
retry:
# 开启重试
enabled: true
# 最大重试次数
max-attempts: 3
# 第一次和第二次重试之间的持续时间
initial-interval: "3s"
---
spring:
config:
activate:
on-profile: dev
# 项目配置
novel:
# 跨域配置
cors:
# 允许跨域的域名
allow-origins:
- http://localhost:1024
- http://localhost:8080
# JWT密钥
jwt:
secret: E66559580A1ADF48CDD928516062F12E
# XSS 过滤配置
xss:
# 过滤开关
enabled: true
# 排除链接
excludes:
- /system/notice/*
file:
# 文件上传配置
upload:
# 上传路径
path: /Users/xiongxiaoyang/upload