| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- server:
- port: 8080
- spring:
- application:
- name: zhijiayun-pharmacy-test
- # 让未找到的路径抛出 NoHandlerFoundException(404)而不是转发到 /error
- mvc:
- throw-exception-if-no-handler-found: true
- web:
- resources:
- add-mappings: false
- # MySQL 数据库
- datasource:
- url: jdbc:mysql://localhost:3308/zhijiayun_pharmacy1?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
- username: root
- password: 123456
- driver-class-name: com.mysql.cj.jdbc.Driver
- # HikariCP 连接池配置
- hikari:
- minimum-idle: 2
- maximum-pool-size: 10
- connection-timeout: 30000
- max-lifetime: 600000
- idle-timeout: 60000
- # 禁用 SQL 初始化(测试用代码建表)
- sql:
- init:
- mode: never
- # Redis(测试时实际不使用,但配置防止启动报错)
- data:
- redis:
- host: localhost
- port: 6379
- # JWT 配置(测试用)
- jwt:
- secret: TestSuperSecretKeyForJWTTokenGenerationMustBeAtLeast256BitsLong!!
- user-expiration: 3600000 # 1小时(毫秒)
- admin-expiration: 43200000 # 12小时(毫秒)
- expiration: 86400000
- refresh-expiration: 604800000
- # 阿里云短信(测试不实际发送)
- sms:
- access-key-id: test_key
- access-key-secret: test_secret
- sign-name: 测试
- template-code: SMS_TEST
- code-length: 6
- expire-minutes: 5
- endpoint: dysmsapi.aliyuncs.com
- test-mode: true
- test-code: "123456"
- # 微信(测试不实际调用)
- wechat:
- open:
- app-id: test_app_id
- app-secret: test_app_secret
- qr-connect:
- redirect-uri: http://localhost/callback
- scope: snsapi_login
- # MyBatis-Plus
- mybatis-plus:
- configuration:
- map-underscore-to-camel-case: true
- global-config:
- db-config:
- id-type: auto
- mapper-locations: classpath*:/mapper/**/*.xml
- # 网关配置(测试)
- gateway:
- logging:
- enabled: true
- slow-threshold: 500
- exclude-paths:
- - /actuator/health
- rate-limit:
- enabled: false
- logging:
- level:
- com.xuekairui: debug
- org.springframework.context.support.DefaultLifecycleProcessor: error
- # 支付配置(测试环境启用模拟支付)
- payment:
- mock: true
|