小乐AI应用开发微服务(lczChatManageServer)提供AI应用开发的相关服务,包括:AI知识库管理、文档库文档入库学习、主题设计、主题权限配置等。

支持版本: v8.0.0

本微服务的部署过程如下:

配置yml文件

lczChatAIServer\application.yml 文件:

spring:
  application:
    name: lczChatManage
  servlet:
    multipart:
      enabled: true
      max-file-size: 100MB
      max-request-size: 100MB

feign:
  httpclient:
    enabled: true
    max-connections: 100
    connection-timeout: 1000
    time-to-live: 10
    time-to-live-unit: minutes
  lcz_server:
    platform:
      name: lczPlatform
      url: http://127.0.0.1:8081/lczServer
    chat_bi:
      name: lczChatBI
      url: http://127.0.0.1:9099/lczServer

#熔断配置
hystrix:
  command:
    execution:
      timeoutInMilliseconds: 2000    #熔断超时时间
      isolation:
        strategy: THREAD
  threadPool:
    coreSize: 20
    maxQueueSize: 200
    maximumSize: 200
    keepAliveTimeMinutes: 6
    queueSizeRejectionThreshold: 201 # 拒绝队列大小

server:
  port: 9100
  #Tomcat
  tomcat:
    threads:
      #最小线程数
      min-spare: 10
      #最大线程数
      max: 500
      #等待最大队列长度
    accept-count: 1000
    #最大链接数
    max-connections: 2000
  servlet:
    context-path: /lczServer


logging:
  config: classpath:conf/log4j2.xml

mybatis-plus:
  mapper-locations: classpath*:/mapper/**/*.xml
  configuration:
    map-underscore-to-camel-case: true
    log-impl: com.datanew.config.MybatisPlusLog
  global-config:
    banner: false

ok-http:
  connect-timeout: 60
  read-timeout: 600
  write-timeout: 600
  #连接池中整体的空闲连接的最大数量
  max-idle-connections: 200
  #连接空闲时间最多为300秒
  keep-alive-duration: 300

auto-create-config:
  question-character-length: 200

pdf-http-server:
  path: http://127.0.0.1:18000          #转换服务地址
  type: python    # python:使用本地转换服务, java:使用远程转换服务

一般需要进行以下配置:
(1) 修改 feign->lcz_server 下各微服务的 url 访问地址。
  url的配置规则:直接配置代理的nginx访问地址即可,格式: http(https)://nginx地址:端口/lczServer;
(2) 修改应用上下文路径(可选):默认为lczServer,如果访问地址中需要重命名,那么 server-> servlet -> context-pathfeign->lcz_server -> url 中都需要一致性修改。同时,nginx.conf文件中也做对应调整。

【警告】yml文件修改时,不要随意调整对象和属性的缩进格式,否则文件配置读取会失败。

作者:柳杨  创建时间:2025-05-22 10:46
最后编辑:柳杨  更新时间:2025-05-22 12:17