server:
  port: ${AIIMAGE_SERVER_PORT:18080}

spring:
  application:
    name: aiimage-backend
  config:
    import: optional:classpath:application-local.yml
  servlet:
    multipart:
      max-file-size: 200MB
      max-request-size: 500MB
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: ${AIIMAGE_DB_URL:jdbc:mysql://127.0.0.1:3306/aiimage?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false}
    username: ${AIIMAGE_DB_USERNAME:root}
    password: ${AIIMAGE_DB_PASSWORD:change-me}

management:
  health:
    db:
      enabled: false

logging:
  file:
    path: ${AIIMAGE_LOG_PATH:./logs}
    name: ${AIIMAGE_LOG_FILE:aiimage-backend.log}
  level:
    root: INFO
    com.nanri.aiimage: INFO
  pattern:
    file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
    console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"

mybatis-plus:
  mapper-locations: classpath*:mapper/**/*.xml
  configuration:
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

springdoc:
  api-docs:
    enabled: true

knife4j:
  enable: true
  setting:
    language: zh_cn

aiimage:
  oss:
    region: ${AIIMAGE_OSS_REGION:cn-hangzhou}
    endpoint: ${AIIMAGE_OSS_ENDPOINT:oss-cn-hangzhou.aliyuncs.com}
    bucket: ${AIIMAGE_OSS_BUCKET:change-me}
    access-key-id: ${AIIMAGE_OSS_ACCESS_KEY_ID:change-me}
    access-key-secret: ${AIIMAGE_OSS_ACCESS_KEY_SECRET:change-me}
  storage:
    local-temp-dir: ${AIIMAGE_STORAGE_LOCAL_TEMP_DIR:./data/tmp}
