You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.8 KiB

6 days ago
  1. # 数据源配置
  2. spring:
  3. datasource:
  4. type: com.alibaba.druid.pool.DruidDataSource
  5. driverClassName: com.mysql.cj.jdbc.Driver
  6. druid:
  7. # 主库数据源
  8. master:
  9. url: jdbc:mysql://localhost:3306/chenhai_ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  10. username: root
  11. password: root
  12. # url: jdbc:mysql://localhost:3307/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  13. # username: root
  14. # password: root
  15. # 从库数据源
  16. slave:
  17. # 从数据源开关/默认关闭
  18. enabled: false
  19. url: jdbc:mysql://localhost:3306/erp?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  20. username: root
  21. password: root
  22. # 初始连接数
  23. initialSize: 5
  24. # 最小连接池数量
  25. minIdle: 10
  26. # 最大连接池数量
  27. maxActive: 20
  28. # 配置获取连接等待超时的时间
  29. maxWait: 60000
  30. # 配置连接超时时间
  31. connectTimeout: 30000
  32. # 配置网络超时时间
  33. socketTimeout: 60000
  34. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  35. timeBetweenEvictionRunsMillis: 60000
  36. # 配置一个连接在池中最小生存的时间,单位是毫秒
  37. minEvictableIdleTimeMillis: 300000
  38. # 配置一个连接在池中最大生存的时间,单位是毫秒
  39. maxEvictableIdleTimeMillis: 900000
  40. # 配置检测连接是否有效
  41. validationQuery: SELECT 1 FROM DUAL
  42. testWhileIdle: true
  43. testOnBorrow: false
  44. testOnReturn: false
  45. webStatFilter:
  46. enabled: true
  47. statViewServlet:
  48. enabled: true
  49. # 设置白名单,不填则允许所有访问
  50. allow:
  51. url-pattern: /druid/*
  52. # 控制台管理用户名和密码
  53. login-username: ruoyi
  54. login-password: 123456
  55. filter:
  56. stat:
  57. enabled: true
  58. # 慢SQL记录
  59. log-slow-sql: true
  60. slow-sql-millis: 1000
  61. merge-sql: true
  62. wall:
  63. config:
  64. multi-statement-allow: true
  65. ai:
  66. zhipuai:
  67. api-key: e24ed227aff14409b2cc5b0ee7f97df8.7vryPYluxxmvtl7z
  68. base-url: "https://open.bigmodel.cn/api/paas"
  69. chat:
  70. options:
  71. model: glm-4-flash
  72. # embedding:
  73. # enabled: false
  74. embedding:
  75. options:
  76. model: embedding-3 # 使用的嵌入模型名称(embedding-3)
  77. dimensions: 256 # 嵌入向量的维度(256维)
  78. # ai:
  79. # ollama:
  80. # base-url: http://127.0.0.1:11434
  81. # chat:
  82. # options:
  83. # model: qwen3:4b
  84. ollama:
  85. base-url: http://172.16.1.165:11434
  86. chat:
  87. model: deepseek-r1:14b
  88. # mcp:
  89. # client:
  90. # request-timeout: 30s
  91. # toolcallback:
  92. # enabled: true
  93. # stdio:
  94. # servers-configuration: classpath:/mcp-servers.json
  95. #logging:
  96. # level:
  97. # org.springframework.web.reactive.function.client: TRACE
  98. # org.springframework.ai: DEBUG
  99. # org.springframework.ai.client: DEBUG