| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- # ============================================
- # Lingyue Starter - 单体应用统一配置
- # ============================================
- # 引入公共配置(标记为可选,避免文件不存在时启动失败)
- spring.config.import=optional:classpath:application-common.properties,optional:classpath:application-infra.properties
- # 服务端口
- server.port=8000
- 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
- # 国际化配置
- 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 API配置
- deepseek.api.url=https://api.deepseek.com
- deepseek.api.key=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- deepseek.api.model=deepseek-chat
- deepseek.api.timeout=60000
- # ============================================
- # 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=500
- rag.chunk.overlap=50
- # RAG 检索配置
- rag.search.top-k=3
- # RAG 自动索引配置
- rag.auto-index.enabled=true
- # XSS防护配置
- xss.enabled=true
- xss.excludes=/auth/register,/auth/login
- xss.urlPatterns=/documents/*,/parse/*,/ai/*,/graphs/*
- # 日志配置(覆盖公共配置)
- logging.level.root=INFO
- logging.level.com.lingyue=INFO
- logging.level.org.springframework=WARN
- logging.level.org.springframework.web=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=${REDIS_PASSWORD:}
- # ============================================
- # 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}
|