# 开发环境配置 server: # 服务器的HTTP端口,默认为80 port: 8094 tomcat: # tomcat的URI编码 uri-encoding: UTF-8 # tomcat最大线程数,默认为200 max-threads: 800 # Tomcat启动初始化的线程数,默认值25 min-spare-threads: 30 #超时时间 connection-timeout: 600000 accesslog: enabled: true buffered: true prefix: access_log file-date-format: .yyyy-MM-dd mvc: pathmatch: matching-strategy: ant_path_matcher # 日志配置 logging: console.enabled: ${CONSOLE_ENABLED:true} file.enabled: ${FILE_ENABLED:false} level: com.poyee: debug fluentd: enabled: ${FLUENTD_ENABLED:false} host: ${FLUENTD_HOST:127.0.0.1} port: ${FLUENTD_PORT:24225} audit: enabled: ${AUDIT_ENABLED:false} host: ${AUDIT_HOST:192.168.1.51} port: ${AUDIT_PORT:24225} bee: enabled: true # Spring配置 spring: application: name: ratingRecommend datasource: type: com.alibaba.druid.pool.DruidDataSource driverClassName: org.postgresql.Driver # url: jdbc:postgresql://192.168.50.8:5432/test01 url: jdbc:postgresql://192.168.77.80:5432/mongo_grade?useUnicode=true&characterEncoding=UTF-8 username: postgres password: 123456 druid: # 初始连接数 initialSize: 5 # 最小连接池数量 minIdle: 10 # 最大连接池数量 maxActive: 50 # 配置获取连接等待超时的时间 maxWait: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 timeBetweenEvictionRunsMillis: 60000 # 配置一个连接在池中最小生存的时间,单位是毫秒 minEvictableIdleTimeMillis: 300000 # 配置一个连接在池中最大生存的时间,单位是毫秒 maxEvictableIdleTimeMillis: 900000 # 配置检测连接是否有效 validationQuery: SELECT 1 testWhileIdle: true testOnBorrow: false testOnReturn: false webStatFilter: enabled: true statViewServlet: enabled: true # 设置白名单,不填则允许所有访问 allow: url-pattern: /druid/* # 控制台管理用户名和密码 login-username: login-password: filter: stat: enabled: true # 慢SQL记录 log-slow-sql: true slow-sql-millis: 500 merge-sql: true wall: config: multi-statement-allow: true redis: # database: 1 # host: 192.168.50.8 # port: 26379 # sentinel: # master: ${SENTINEL_MASTER:poyee-master} # nodes: ${SENTINEL_NODES:192.168.50.8:26379} # password: Pass2010 # 密码(默认为空) # timeout: 60000 # 连接超时时长(毫秒) # pool: # max-active: 100 # 连接池最大连接数(使用负值表示没有限制) # max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制) # max-idle: 50 # 连接池中的最大空闲连接 # min-idle: 20 # 连接池中的最小空闲连接 # 单机Redis配置 host: 192.168.77.80 port: 6379 # 如果你的Redis有密码,写你的密码,没有就注释掉这行 password: Pass2025 database: 0 timeout: 60000 # Lettuce连接池配置(解决空闲连接被Redis服务端断开导致Connection reset by peer) lettuce: pool: max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制) max-idle: 10 # 连接池中的最大空闲连接 min-idle: 5 # 连接池中的最小空闲连接 #mq rabbitmq: host: 192.168.77.80 port: 5672 username: order password: Pass2025 #确认消息已发送到交换机(Exchange) publisher-confirms: true #确认消息已发送到队列(Queue) publisher-returns: true virtual-host: /order template: retry: enabled: true mandatory: true listener: simple: acknowledge-mode: manual #并发消费者初始化值 #concurrency: 10 #并发消费者的最大值 #max-concurrency: 20 #每个消费者每次监听时可拉取处理的消息数量 prefetch: 5 direct: retry: enabled: true max-attempts: 1 flyway: # 是否启用flyway enabled: true # 指定表 table: flyway_schema_history_admin # 禁止清理数据库表 clean-disabled: true # 编码格式,默认UTF-8 encoding: UTF-8 # 迁移sql脚本文件存放路径,默认db/migration locations: classpath:db/migration # 迁移sql脚本文件名称的前缀,默认V sql-migration-prefix: V # 迁移sql脚本文件名称的分隔符,默认2个下划线__ sql-migration-separator: _ # 迁移sql脚本文件名称的后缀 sql-migration-suffixes: .sql # 迁移时是否进行校验,默认true # validate-on-migrate: true # 当迁移发现数据库非空且存在没有元数据的表时,自动执行基准迁移,新建schema_version表 baseline-on-migrate: true url: ${DB_URL:jdbc:postgresql://192.168.77.80:5432/mongo_grade} user: ${DB_USERNAME:postgres} password: ${DB_PASSWORD:123456} # 禁用描述校验(避免mismatch报错) validate-migration-naming: false # 或禁用整体校验(不推荐,会跳过版本/描述等所有校验) validate-on-migrate: false # MyBatis mybatis: # 搜索指定包别名 typeAliasesPackage: com.poyee.common.po,com.poyee.**.domain # 配置mapper的扫描,找到所有的mapper.xml映射文件 mapperLocations: classpath*:mapper/**/*Mapper.xml management: endpoints: web: exposure: include: "*" # 使用通配符启用所有端点 base-path: /actuator endpoint: health: show-details: always enabled: true metrics: enabled: true prometheus: enabled: true info: enabled: true metrics: export: prometheus: enabled: true step: 30s descriptions: true enable: jvm: true system: true logback: true processor: true http: true hikaricp: true tags: application: order health: defaults.enabled: false db.enabled: true diskspace.enabled: true # knife4j 配置 knife4j: # 是否开启 knife4j enabled: true #生产模式屏蔽 production: true basic: #是否需要登录 enable: true username: admin password: 123456 pay: #微信支付 wxpay: app: appID: wx8ee47a255776f241 # 腾讯云COS配置 tencent: cos: secret-id: ${TENCENT_COS_SECRET_ID:AKIDeCb2X834B3yz4EUdpzyoQoCRWUcm1JgT} secret-key: ${TENCENT_COS_SECRET_KEY:dXUSPLGHLSd58C6nGUTJySiyFUgrz236} region: ${TENCENT_COS_REGION:ap-shanghai} bucket-name: ${TENCENT_COS_BUCKET_NAME:ranking-1309648802} domain: ${TENCENT_COS_DOMAIN:https://your-domain.com} prefix: ${TENCENT_COS_PREFIX:/mongoo/rating/images/} max-file-size: ${TENCENT_COS_MAX_FILE_SIZE:10485760} allow-file-types: ${TENCENT_COS_ALLOW_FILE_TYPES:jpg,jpeg,png,gif,bmp,webp} generate-server-url: report: http://192.168.77.249:7755/api/rating/generate report-status: http://192.168.77.249:7755/api/cards/review_state score: http://192.168.77.249:7755/api/cards/card_list_filter batch-score: http://192.168.77.249:7755/api/cards/batch_query/id_score camera-server-url: start-task: http://192.168.31.191:7961/api/monitor/start_task stop-task: http://192.168.31.191:7961/api/monitor/stop_task query-task: http://192.168.31.191:7961/api/monitor/query_task # Feign客户端服务URL配置 camera-service: url: http://192.168.31.191:7961 generate-service: url: http://grade-service pay-service: url: http://192.168.77.249:7756 coupon-service: url: http://coupon order-service: url: http://order # Feign配置 feign: client: config: default: connectTimeout: 60000 readTimeout: 60000 loggerLevel: full # 物流api express: resultUrl: https://m2-dev.hobbystocks.cn/expressInfo/result flushTokenUrl: http://delivery/expressInfo/flushToken flushOrderUrl: http://delivery/expressInfo/flushOrder # Shiro shiro: user: # 登录地址 loginUrl: /login # 权限认证失败地址 unauthorizedUrl: /unauth # 首页地址 indexUrl: /index # 验证码开关 captchaEnabled: false # 验证码类型 math 数组计算 char 字符 captchaType: math cookie: # 设置Cookie的域名 默认空,即当前访问的域名 domain: # 设置cookie的有效访问路径 path: / # 设置HttpOnly属性 httpOnly: true # 设置Cookie的过期时间,天为单位 maxAge: 30 # 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)KeyGenerator keygen = KeyGenerator.getInstance("AES"); SecretKey deskey = keygen.generateKey(); System.out.println(Base64.encodeToString(deskey.getEncoded())); cipherKey: zSyK5Kp6PZAAjlT+eeNMlg== session: # Session超时时间,-1代表永不过期(默认30分钟) expireTime: 480 # 同步session到数据库的周期(默认1分钟) dbSyncPeriod: 1 # 相隔多久检查一次session的有效性,默认就是10分钟 validationInterval: 10 # 同一个用户最大会话数,比如2的意思是同一个账号允许最多同时两个人登录(默认-1不限制) maxSession: 10 # 踢出之前登录的/之后登录的用户,默认踢出之前登录的用户 kickoutAfter: false # AI 智能助手 ai: base-url: ${AI_GATEWAY_BASE_URL:https://sub2api.hobbystocks.cn} api-key: ${AI_GATEWAY_API_KEY:replace-me} model: ${AI_MODEL:claude-opus-4-8} max-tokens: 4096 session-ttl-minutes: 30 max-iterations: 5 connect-timeout-ms: 10000 read-timeout-ms: 120000 # ratingApp 业务服务地址(AI 助手通过 Feign 远程调其订单/物流接口) rating-app: url: ${RATING_APP_URL:192.168.31.111:8091} # 评级时效推荐功能配置 recommend: default-efficiency: 1 batch-max: 50 time-limit-mapping: "普通": 1 "快速": 2 "闪评": 3