# spring配置
spring:
  ai:
    openai:
      base-url: http://10.208.247.136:5188
      api-key: sk-proj-P2rFv8UkQm7cELdyx91TZKnJuHb4Os5BqEjgtNaRvxU
      chat:
        options:
          model: gpt-4o
          temperature: 0.7
  # MongoDB配置
  data:
    mongodb:
      # MongoDB服务器地址
      host: ${MONGODB_HOST:172.25.176.1}
      # MongoDB端口
      port: ${MONGODB_PORT:27017}
      # 数据库名称
      database: ${MONGODB_DATABASE:iiot_ai}
      # 用户名
      username: ${MONGODB_USERNAME:admin}
      # 密码
      password: ${MONGODB_PASSWORD:000000,admin}
      # 认证数据库 (通常是admin)
      authentication-database: ${MONGODB_AUTH_DB:admin}
      # 连接池配置
      options:
        # 最大连接数
        connections-per-host: 20
        # 最小连接数
        min-connections-per-host: 5
        # 连接超时时间(毫秒)
        connect-timeout: 10000
        # Socket超时时间(毫秒)  
        socket-timeout: 0
        # 最大等待时间(毫秒)
        max-wait-time: 120000
      auto-index-creation: true 
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://172.25.176.1:3306/iiot-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8
    username: root
    password: 000000,zml
    druid:
      initial-size: 5
      min-idle: 5
      max-active: 20
      max-wait: 60000
      time-between-eviction-runs-millis: 60000
      min-evictable-idle-time-millis: 300000
      validation-query: SELECT 1 FROM DUAL
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
  main:
    allow-circular-references: true
    allow-bean-definition-overriding: true
  jpa:
    hibernate:
      ddl-auto: update
    show-sql: true
    database-platform: org.hibernate.dialect.MySQLDialect
    properties:
      hibernate:
        dialect: org.hibernate.dialect.MySQLDialect
# seata配置
seata:
  # 默认关闭，如需启用spring.datasource.dynami.seata需要同时开启
  enabled: false
  # Seata 应用编号，默认为 ${spring.application.name}
  application-id: ${spring.application.name}
  # Seata 事务组编号，用于 TC 集群名
  tx-service-group: ${spring.application.name}-group
  # 关闭自动代理
  enable-auto-data-source-proxy: false
  # 服务配置项
  service:
    # 虚拟组和分组的映射
    vgroup-mapping:
      ruoyi-system-group: default
  config:
    type: nacos
    nacos:
      serverAddr: 192.168.1.100:8848
      group: SEATA_GROUP
      namespace:
  registry:
    type: nacos
    nacos:
      application: seata-server
      server-addr: 192.168.1.100:8848
      namespace:
# swagger配置
swagger:
  title: 系统模块接口文档
  license: Powered By iiot
  licenseUrl: http://www.ufc-cloud.com
# IIoT自定义配置
iiot:
  ai:
    # 💬 可以根据业务场景自定义系统角色
    default-system-message: "你是一个理性的人工智能助手，你的名字叫呦呦"