# 配置文件加密key 生产环境中可通过环境变量、命令行等形式进行设置 jasypt: encryptor: password: hiver server: port: 8888 servlet: context-path: / tomcat: uri-encoding: UTF-8 threads: # 工作线程的最大数量 io密集型建议10倍的cpu数,cpu密集型建议cpu数+1,绝大部分应用都是io密集型 max: 2000 # 工作线程的最小数量,初始化时创建的线程数 min-spare: 30 # 最大吞吐量不限制 max-swallow-size: -1 # 优雅停机 关闭容器后默认等待30秒继续执行没处理完的任务 避免数据不一致 shutdown: graceful spring: lifecycle: # 配置优雅停机后的缓冲器 最大等待时间 timeout-per-shutdown-phase: 10S # 数据源 datasource: # url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true username: reddoor # Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456 password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe) type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.jdbc.Driver # Druid StatViewServlet配置 druid: stat-view-servlet: # 默认true 内置监控页面首页/druid/index.html enabled: true url-pattern: /druid/* # 允许清空统计数据 reset-enable: true login-username: reddoor login-password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe) # IP白名单 多个逗号分隔 allow: # IP黑名单 deny: filter: stat: # 开启监控sql enabled: true # 显示并标注慢sql 默认当超过3秒显示 log-slow-sql: true slow-sql-millis: 3000 merge-sql: true # 防SQL注入过滤 wall: config: # 允许多条sql同时执行 multi-statement-allow: true jpa: # 显示sql show-sql: true # 自动生成表结构 关闭设为none hibernate: ddl-auto: update # Redis 若设有密码自行添加配置password redis: # host: 154.8.162.157 host: 8.140.198.243 password: reddoor168 # 数据库索引 默认0 database: 1 port: 6379 # 超时时间 Duration类型 3秒 timeout: 3S # Elasticsearch data: elasticsearch: repositories: # 默认未使用ES 关闭其持久化存储 enabled: false elasticsearch: rest: # 要连接的ES客户端Rest Uri 多个逗号分隔 uris: http://localhost:9200 # 定时任务 quartz: # 任务信息存储至数据库 job-store-type: jdbc jdbc: # 自动生成表 若已有表数据请务必关闭 ALWAYS/EMBEDDED/NEVER initialize-schema: NEVER properties: org: quartz: scheduler: # 允许调度程序节点一次获取(触发)的最大触发器数 batchTriggerAcquisitionMaxCount: 5 jobStore: # 加锁调度 acquireTriggersWithinLock: true # “容忍”触发器经过下一次触发时间的毫秒数 misfireThreshold: 10000 servlet: multipart: max-file-size: -1 max-request-size: -1 jackson: time-zone: GMT+8 serialization: fail-on-empty-beans: false boot: admin: # 修改上下文路径 context-path: /hiver/admin client: # 服务端url url: http://127.0.0.1:${server.port}/hiver/admin instance: # 实例url service-base-url: http://127.0.0.1:${server.port}/ web: resources: cache: cachecontrol: # 静态资源缓存30天 max-age: 30D autoconfigure: exclude: # Activiti5.22需要排除 # - org.activiti.spring.boot.SecurityAutoConfiguration # 暂未使用ES 排除client自动装配类 - org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRestClientAutoConfiguration task: execution: pool: # 线程池创建时的初始化线程数,默认为8 core-size: 10 # 线程池的最大线程数,默认为int最大值 max-size: 100 # 用来缓冲执行任务的队列,默认为int最大值 queue-capacity: 200 # 非核心线程的存活时间,线程终止前允许保持空闲的时间 keep-alive: 60 hiver: # 全局限流 ratelimit: # 开启 enable: true # 每1秒内(单位毫秒) timeout: 1000 # 总限制200个请求(单位个) limit: 200 # IP限流 iplimit: # 开启 enable: true # 每1秒内(单位毫秒) timeout: 1000 # 每个ip限制20个请求(单位个) limit: 20 # 【ToB】后台token交互方式 token: # 默认为true,token将存入redis,并具有单设备登录、自动刷新token过期时间功能 设为false使用JWT交互 redis: true # 是否开启单设备登陆 一个账号仅支持同时一台设备登录 仅当token交互方式为redis时生效 sdl: true # token中存储用户权限数据 开启后可避免每次请求再获取用户权限,但有可能导致编辑权限菜单后无法读取到最新权限数据(需用户重新登录) storePerms: true # token过期时间 redis模式下有请求自动刷新过期时间(分钟) tokenExpireTime: 60 # 用户选择 保存登录状态/记住我 对应token过期时间 不会自动刷新过期时间(天) saveLoginTime: 7 # 限制用户登陆错误次数(次) loginTimeLimit: 10 # 错误超过次数后多少分钟后才能继续登录(分钟) loginAfterTime: 10 # 【ToC】app应用 token交互配置 appToken: # 默认为true,token将存入redis,并具有单设备登录、自动刷新token过期时间功能 设为false使用JWT交互 redis: true # 是否开启同一平台单设备登陆(如安卓设备只允许登录一个相同账号,IOS设备可允许一个设备同时登陆) spl: true # token过期时间 redis模式下有请求自动刷新过期时间(天) tokenExpireTime: 30 # 使用Spring @Cacheable注解失效时间 cache: # 缓存过期时间 Duration类型 D–天 H小时 M–分钟 S–秒 永久不过期设为非正值 timeToLive: 15D # 日志记录方式 true使用Elasticsearch记录 false记录至数据库中 logRecord: es: false # 文件大小上传配置 单位MB maxUploadFile: 5 # 腾讯位置服务key配置 腾讯位置服务官网注册添加key qqlbs: key: 你的腾讯位置服务key # 第三方社交登录配置 social: # 前端回调登录地址 callbackFeUrl: http://127.0.0.1:9999/login # 前端绑定账号回调地址 callbackFeRelateUrl: http://127.0.0.1:9999/relate # github github: clientId: 你的clientId clientSecret: 你的clientSecret callbackUrl: http://127.0.0.1:8888/hiver/social/github/callback # qq qq: appId: 你的appId appKey: 你的appKey callbackUrl: http://127.0.0.1:8888/hiver/social/qq/callback # weibo weibo: appKey: 你的appKey appSecret: 你的appSecret callbackUrl: http://127.0.0.1:8888/hiver/social/weibo/callback # wechat wechat: appId: 你的appId appSecret: 你的appSecret callbackUrl: http://127.0.0.1:8888/hiver/social/wechat/callback # 钉钉 dingding: # 扫码登录应用 appId: 你的appId appSecret: 你的appSecret callbackUrl: http://127.0.0.1:8888/hiver/social/dingding/callback # 企业微信 workwechat: appId: 你的appId 企业的CorpID agentId: 你的应用ID appSecret: 你的应用Secret callbackUrl: http://127.0.0.1:8888/hiver/social/workwechat/callback app: # 第三方社交登录 social: # 微信小程序 wxMini: appId: 你的appId appSecret: 你的appSecret # 需要验证码校验的接口路径 支持通配符 自动过滤拦截校验 无需开发人员再次校验 captcha: # 图片验证码验证 image: - /hiver/auth/login # 登录接口 - /hiver/oauth2/authorize # 开放平台认证接口 #- /hiver/common/captcha/sendRegistSms/** # 发送注册短信 - /hiver/common/captcha/sendResetSms/** # 发送重置密码短信 - /hiver/email/sendResetCode/** # 发送重置密码邮件 - /hiver/social/relate # 绑定第三方账号 # 短信验证码验证 sms: - /hiver/auth/register # 注册接口 - /hiver/auth/shopRegister # 店铺注册接口 - /hiver/auth/smsLogin # 短信登录接口 - /hiver/auth/resetByMobile # 手机重置密码 - /hiver/user/changeMobile # 更换绑定手机 - /hiver/app/v1/member/quickLogin # 会员快捷登录注册接口 - /hiver/auth/worker/app/smsLogin #运送员登录接口 # Email验证码验证 email: - /hiver/auth/resetByEmail # 邮件重置密码 - /hiver/email/editEmail # 修改绑定邮箱 # 忽略url ignored: # 无需登录认证的请求 urls: - /hiver/auth/** - /hiver/app/v1/** - /hiver/oauth2/** - /hiver/actuator/** - /hiver/admin/** - /chat/** - /modeler/** - /hiver/act/** - /hiver/dictData/getByType/** - /hiver/email/sendResetCode/** - /hiver/file/view/** - /hiver/social/** - /hiver/ws/** - /hiver/setting/notice - /hiver/common/** - /druid/** - /doc.html - /swagger-resources/** - /v2/api-docs - /**/*.js - /**/*.css - /**/*.png - /**/*.ico - /hiver/test/** - /hiver/app/auth/** - /hiver/app/home/** - /hiver/goview/sys/** - /hiver/goview/project/** - /hiver/iot/sensorHelper/** - /hiver/goview/visual/** - /hiver/license/verifyLicense # 发送短信验证码不能拦截 - /hiver/auth/worker/app/sendLoginSms - /hiver/common/captcha/sendRegistSms - /hiver/app/logitics/login # 验证妈不能拦截 - /hiver/common/captcha/** # 分享的连接不用拦截 - /hiver/app/productShare/** # 注册发送手机验证码 # 下游客户下单不用拦截 - /hiver/app/sale/savePresale - /hiver/app/productShare/getShareList - /hiver/app/productAttribute/selectAttributeAndValueByCategoryId - /hiver/app/stock/productCount # 选择物流公司 - /hiver/app/logitics/chooseCompany # 根据客户id分页获取销售历史(按商品) - /hiver/app/sale/getCustomerBuyProductLog # 客户对账单 - /hiver/app/bill/getCustomerBill # 供应商对账单 - /hiver/app/bill/getSupplierBill # 根据客户id分页获取退货历史 - /hiver/app/return/getReturnSaleListByUserId # 根据客户id分页获取销售历史(按销售单) - /hiver/app/sale/listPages - /hiver/app/sale/get/** - /hiver/app/return/list - /hiver/app/return/get/** # # 临时增加 - /hiver/app/purchase/getPurchaseListOfSupplier - /hiver/app/purchase/cancelPurchase # 限流及黑名单不拦截的路径 limitUrls: - /**/*.js - /**/*.css - /**/*.png - /**/*.ico # Actuator management: health: # 暂未用到ES 关闭其健康检查 elasticsearch: enabled: false endpoint: health: show-details: always status: http-mapping: DOWN: 200 OUT_OF_SERVICE: 200 FATAL: 200 UNKNOWN: 200 endpoints: web: base-path: /hiver/actuator/ exposure: include: '*' # 接口文档增强UI Swagger界面内容配置 knife4j: enable: true swagger: title: Hiver API接口文档 description: Hiver Api Documentation version: 1.0.0 termsOfServiceUrl: https://hiver.cc contact: name: Nein url: https://hiver.cc email: delicacylee@vip.sina.com # 分组名 group: 1.Hiver管理接口 v1.0 group2: 2.Hiver APP接口 v1.0 # Mybatis-plus mybatis-plus: mapper-locations: classpath*:mapper/*.xml configuration: # 日志控制台打印 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 日志 logging: # 输出级别 level: root: info file: # 指定路径 path: hiver-logs logback: rollingpolicy: # 最大保存天数 max-history: 7 # 每个文件最大大小 max-file-size: 5MB jpush: appKey: 130f556e8473c9b558777fe3 masterSecret: 2b4e5196dfc40a78db36480d aliyun: openapi: accessKeyId: 56640 # 阿里云秘钥 accessKeySecret: sk-bcfa4865b89548acb8225f910f13d682