# 公共配置文件
# @author 程序员鱼皮
# @from 编程导航知识星球
spring:
application:
name: hebi-backend
# 默认 dev 环境
profiles:
active: dev
# 支持 swagger3
mvc:
pathmatch:
matching-strategy: ant_path_matcher
# session 配置
session:
# todo 取消注释开启分布式 session(须先配置 Redis)
# store-type: redis
# 30 天过期
timeout: 2592000
# 数据库配置
# todo 需替换配置
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://110.40.62.21:3306/hebi
username: hebi
password: 123456
# Redis 配置
# todo 需替换配置,然后取消注释
redis:
database: 1
host: localhost
port: 6379
timeout: 5000
# password: 123456
# Elasticsearch 配置
# todo 需替换配置,然后取消注释
# elasticsearch:
# uris: http://localhost:9200
# username: root
# password: 123456
# 文件上传
servlet:
multipart:
# 大小限制
max-file-size: 10MB
server:
address: 0.0.0.0
port: 8101
servlet:
context-path: /api
# cookie 30 天过期
session:
cookie:
max-age: 2592000
mybatis-plus:
configuration:
map-underscore-to-camel-case: false
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
logic-delete-field: isDelete # 全局逻辑删除的实体字段名
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
# 微信相关
wx:
# 微信公众平台
# todo 需替换配置
mp:
token: xxx
aesKey: xxx
appId: xxx
secret: xxx
config-storage:
http-client-type: HttpClient
key-prefix: wx
redis:
host: 127.0.0.1
port: 6379
type: Memory
# 微信开放平台
# todo 需替换配置
open:
appId: xxx
appSecret: xxx
# 对象存储
# todo 需替换配置
cos:
client:
accessKey: xxx
secretKey: xxx
region: xxx
bucket: xxx
# 接口文档配置
knife4j:
enable: true
openapi:
title: "接口文档"
version: 1.0
group:
default:
api-rule: package
api-rule-resources:
- com.yupi.springbootinit.controller
## 讯飞 AI 配置
xun-fei:
client:
appId: 6b30952a
apiSecret: Mzk2YjZhN2ZmODgwNGI2YmUzNDQ0Yjk1
apiKey: faa9c010048c45e709ebf4585aa03e41