application.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. server:
  2. port: 8080
  3. spring:
  4. application:
  5. name: recycle-app-backend
  6. datasource:
  7. driver-class-name: com.mysql.cj.jdbc.Driver
  8. url: jdbc:mysql://localhost:3306/huanbao?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
  9. username: root
  10. password: your_password # 请替换为你的MySQL密码
  11. jackson:
  12. date-format: yyyy-MM-dd HH:mm:ss
  13. time-zone: Asia/Shanghai
  14. default-property-inclusion: non_null
  15. data:
  16. redis:
  17. host: localhost
  18. port: 6379
  19. database: 0
  20. # password: your_redis_password
  21. mybatis-plus:
  22. mapper-locations: classpath*:/mapper/**/*.xml
  23. type-aliases-package: com.recycle.entity
  24. global-config:
  25. db-config:
  26. id-type: auto
  27. logic-delete-field: deleted
  28. logic-delete-value: 1
  29. logic-not-delete-value: 0
  30. configuration:
  31. map-underscore-to-camel-case: true
  32. log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  33. # Knife4j配置 (Swagger 2)
  34. knife4j:
  35. enable: true
  36. setting:
  37. language: zh_cn
  38. enableSwaggerModels: true
  39. enableDocumentManage: true
  40. swaggerModelName: 实体类列表
  41. # JWT配置
  42. jwt:
  43. secret: your-jwt-secret-key # 请替换为你的JWT密钥(建议32位以上随机字符串)
  44. expiration: 86400000 # 24小时
  45. # DeepSeek AI配置
  46. ai:
  47. api:
  48. key: your-deepseek-api-key # 请替换为你的DeepSeek API Key,申请地址: https://platform.deepseek.com
  49. url: https://api.deepseek.com/v1/chat/completions
  50. model: deepseek-chat