server: port: 8003 spring: application: name: parse-service # 文件上传配置 servlet: multipart: enabled: true max-file-size: 500MB max-request-size: 500MB file-size-threshold: 2KB # 数据库配置(Druid) datasource: type: com.alibaba.druid.pool.DruidDataSource druid: driver-class-name: org.postgresql.Driver url: jdbc:postgresql://localhost:5432/lingyue_zhibao username: ${DB_USERNAME:postgres} password: ${DB_PASSWORD:postgres} 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 test-while-idle: true test-on-borrow: false test-on-return: false pool-prepared-statements: true max-pool-prepared-statement-per-connection-size: 20 filters: stat,wall,slf4j # MyBatis Plus配置 mybatis-plus: mapper-locations: classpath*:mapper/**/*Mapper.xml type-aliases-package: com.lingyue.parse.entity configuration: map-underscore-to-camel-case: true log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl global-config: db-config: id-type: assign_uuid # RabbitMQ配置 rabbitmq: host: ${RABBITMQ_HOST:localhost} port: ${RABBITMQ_PORT:5672} username: ${RABBITMQ_USERNAME:guest} password: ${RABBITMQ_PASSWORD:guest} # Nacos配置 cloud: nacos: discovery: server-addr: ${NACOS_SERVER_ADDR:localhost:8848} namespace: public group: DEFAULT_GROUP # 文件存储配置 file: storage: base-path: ${FILE_STORAGE_BASE_PATH:/data/lingyue/files} text-path: ${FILE_STORAGE_TEXT_PATH:/data/lingyue/texts} allowed-extensions: pdf,doc,docx,xls,xlsx,jpg,jpeg,png,gif # AI服务配置 ai: service: url: ${AI_SERVICE_URL:http://localhost:8007} timeout: 300000 # PaddleOCR配置 paddleocr: server-url: ${PADDLEOCR_SERVER_URL:http://localhost:8866} timeout: 30000 # 解析任务配置 parse: task: # 是否使用RabbitMQ消息队列(默认false,使用线程池) use-mq: ${PARSE_TASK_USE_MQ:false} # 最大重试次数 max-retries: ${PARSE_TASK_MAX_RETRIES:3} # 重试初始延迟(毫秒) retry-initial-delay: ${PARSE_TASK_RETRY_INITIAL_DELAY:1000} # 性能优化配置 performance: # 大文件阈值(字节),超过此大小使用分块处理 large-file-threshold: ${LARGE_FILE_THRESHOLD:52428800} # 50MB # 文件块大小(字节) chunk-size: ${FILE_CHUNK_SIZE:10485760} # 10MB # 日志配置 logging: level: root: INFO com.lingyue: DEBUG