| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- # ============================================
- # Lingyue Starter - 单体应用统一配置
- # ============================================
- # 引入公共配置(标记为可选,避免文件不存在时启动失败)
- spring.config.import=optional:classpath:application-common.properties,optional:classpath:application-infra.properties
- # 服务端口
- server.port=5232
- server.servlet.context-path=/
- server.tomcat.uri-encoding=UTF-8
- server.tomcat.accept-count=1000
- server.tomcat.threads.max=800
- server.tomcat.threads.min-spare=10
- # 应用名称
- spring.application.name=lingyue-zhibao
- app.name=灵越智报
- app.version=2.0.0
- app.copyrightYear=2024
- # 允许 Bean 定义覆盖(单体应用可能有重复的 Bean)
- spring.main.allow-bean-definition-overriding=true
- # 文件上传配置
- spring.servlet.multipart.max-file-size=20MB
- spring.servlet.multipart.max-request-size=100MB
- app.uploadBaseDir=/tmp/lingyue-zhibao
- # 文件存储配置
- file.storage.base-path=${FILE_STORAGE_BASE_PATH:/data/lingyue/files}
- file.storage.text-path=${FILE_STORAGE_TEXT_PATH:/data/lingyue/texts}
- # 国际化配置
- spring.messages.basename=i18n/messages
- # 热部署配置
- spring.devtools.restart.enabled=true
- # MVC配置
- spring.mvc.pathmatch.matching-strategy=ant-path-matcher
- # 激活的配置文件
- spring.profiles.active=dev
- # MyBatis Plus配置(覆盖公共配置)
- mybatis-plus.type-aliases-package=com.lingyue.**.entity
- mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
- # JWT配置
- jwt.secret=${JWT_SECRET:lingyue-zhibao-secret-key-2024-please-change-in-production}
- jwt.expiration=604800000
- jwt.refresh-expiration=2592000000
- # Token配置
- token.header=Authorization
- token.secret=${JWT_SECRET:lingyue-zhibao-secret-key-2024-please-change-in-production}
- token.expireTime=604800
- # 用户配置
- user.password.maxRetryCount=5
- user.password.lockTime=10
- # SpringDoc OpenAPI配置(如遇到问题可临时禁用)
- springdoc.api-docs.enabled=false
- springdoc.swagger-ui.enabled=false
- # springdoc.api-docs.path=/api-docs
- # springdoc.swagger-ui.path=/swagger-ui.html
- # WebSocket配置
- websocket.enabled=true
- websocket.path=/ws
- websocket.allowedOrigins=*
- # PaddleOCR配置
- paddleocr.server-url=${PADDLEOCR_SERVER_URL:http://localhost:8866}
- paddleocr.timeout=30000
- # ==================== DeepSeek模型配置(阿里云百炼平台) ====================
- # DeepSeek API密钥(阿里云百炼平台)
- bailian.deepseek.api-key=sk-14a0d0b9eda54b3bb6f0e55a7b8df084
- # DeepSeek API基础地址(阿里云百炼平台兼容模式)
- bailian.deepseek.base-url=https://dashscope.aliyuncs.com/compatible-mode/v1
- # DeepSeek模型名称(DeepSeek V3.2实验版)
- bailian.deepseek.model-name=deepseek-v3.2-exp
- #bailian.deepseek.model-names=qwen-flash,qwen-plus,deepseek-v3.2-exp
- #bailian.deepseek.model-names=qwen-flash
- bailian.deepseek.rotation-interval=1
- # DeepSeek API调用超时时间(秒)
- bailian.deepseek.timeout=600
- # DeepSeek模型温度参数(控制随机性,0-1)
- bailian.deepseek.temperature=0.7
- # DeepSeek模型最大生成令牌数
- bailian.deepseek.max-tokens=8096
- # 是否启用DeepSeek搜索功能
- bailian.deepseek.enable-search=false
- # DeepSeek API调用最大重试次数
- bailian.deepseek.max-retries=3
- # ============================================
- # RAG 向量化配置
- # ============================================
- # Ollama 配置
- ollama.url=${OLLAMA_URL:http://localhost:11434}
- ollama.embedding.model=${OLLAMA_EMBEDDING_MODEL:nomic-embed-text}
- ollama.timeout=60000
- # RAG 分块配置
- rag.chunk.size=1200
- rag.chunk.overlap=50
- # 向量化批处理配置
- rag.embedding.batch-size=10
- # RAG 检索配置
- rag.search.top-k=3
- # RAG 自动索引配置
- rag.auto-index.enabled=true
- # ============================================
- # NER 服务配置
- # ============================================
- # NER 自动提取配置
- ner.auto-extract.enabled=true
- # Python NER 服务配置
- ner.python-service.url=${NER_SERVICE_URL:http://localhost:8001}
- # 超时时间 5 分钟(DeepSeek API 处理长文档需要较长时间)
- ner.python-service.timeout=300000
- ner.python-service.connect-timeout=5000
- ner.python-service.max-retries=3
- ner.python-service.retry-interval=1000
- # 是否使用异步轮询 API(推荐开启,可实时查看进度)
- ner.python-service.use-async=true
- # 轮询间隔(毫秒)
- ner.python-service.poll-interval=3000
- # 最大等待时间(毫秒),10 分钟
- ner.python-service.max-wait-time=600000
- # NER 实体类型配置
- ner.entity-types=PERSON,ORG,LOC,DATE,NUMBER,DEVICE,PROJECT,TERM
- # XSS防护配置
- xss.enabled=true
- xss.excludes=/auth/register,/auth/login
- xss.urlPatterns=/documents/*,/parse/*,/ai/*,/graphs/*
- # ============================================
- # Actuator 配置
- # ============================================
- management.endpoints.web.exposure.include=health,info,metrics
- management.endpoint.health.show-details=always
- # 日志配置(覆盖公共配置)
- logging.level.root=INFO
- logging.level.com.lingyue=INFO
- logging.level.org.springframework=WARN
- logging.level.org.springframework.web=INFO
- logging.level.org.mybatis.spring.SqlSessionUtils=INFO
- logging.level.org.mybatis.spring=INFO
- logging.level.org.springframework.jdbc=INFO
- logging.level.com.baomidou.mybatisplus=INFO
- # Nacos配置(单体应用禁用服务发现)
- spring.cloud.nacos.discovery.enabled=false
- # 禁用 Feign 和 SpringDoc 自动配置(单体应用不需要)
- spring.cloud.openfeign.enabled=false
- spring.autoconfigure.exclude=\
- org.springframework.cloud.openfeign.FeignAutoConfiguration,\
- org.springdoc.core.configuration.SpringDocConfiguration,\
- org.springdoc.webmvc.ui.SwaggerConfig
- # ============================================
- # 数据库配置(使用标准 HikariCP)
- # ============================================
- spring.datasource.driver-class-name=org.postgresql.Driver
- spring.datasource.url=jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:lingyue_zhibao}
- spring.datasource.username=${DB_USERNAME:lingyue}
- spring.datasource.password=${DB_PASSWORD:123123}
- # HikariCP 连接池配置
- spring.datasource.hikari.minimum-idle=5
- spring.datasource.hikari.maximum-pool-size=20
- spring.datasource.hikari.idle-timeout=30000
- spring.datasource.hikari.max-lifetime=1800000
- spring.datasource.hikari.connection-timeout=30000
- # ============================================
- # Redis 配置
- # ============================================
- spring.data.redis.host=${REDIS_HOST:localhost}
- spring.data.redis.port=${REDIS_PORT:6379}
- spring.data.redis.password=geek
- # ============================================
- # RabbitMQ 配置
- # ============================================
- spring.rabbitmq.host=${RABBITMQ_HOST:localhost}
- spring.rabbitmq.port=${RABBITMQ_PORT:5672}
- spring.rabbitmq.username=${RABBITMQ_USERNAME:admin}
- spring.rabbitmq.password=${RABBITMQ_PASSWORD:admin123}
|