application.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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/recycle_app?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
  9. username: root
  10. password: root # 请根据实际情况修改
  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: recycle-app-jwt-secret-key-2024-very-long-secret
  44. expiration: 86400000 # 24小时