支持版本: v7.2.0+
平台微服务(lczPlatformServer)部署过程如下:

1 配置知识库相关信息

修改 lczPlatformServer\conf\server.config 文件,配置知识库的类型、地址、端口等信息。

本微服务中的server.config暂不支持界面配置,可从lczServer/conf目录下复制过来。

2 配置yml文件**

配置lczPlatformServer\application.yml 文件:

#当前微服务信息
server:
  #平台微服务访问端口
  port: 8081
  servlet:
    #与乐创者服务应用名保持一致
    context-path: /lczServer

  tomcat:
    threads:
      #最小线程数
      min-spare: 10
      #最大线程数
      max: 500
      #等待最大队列长度
    accept-count: 1000
    #最大链接数
    max-connections: 2000

spring:
  application:
    name: lczPlatform
  mvc:
    throw-exception-if-no-handler-found: true

logging:
  config: classpath:conf/log4j2.xml

feign:
  httpclient:
    #客户端请求连接池
    enabled: true
    max-connections: 100
    connection-timeout: 1000
    time-to-live: 10
    time-to-live-unit: minutes
  client:
    config:
      default:
        readTimeout: 1800000

#熔断配置
hystrix:
  command:
    execution:
      #熔断超时时间(ms)
      timeoutInMilliseconds: 2000
      isolation:
        strategy: THREAD
  threadPool:
    coreSize: 20
    maxQueueSize: 200
    maximumSize: 200
    keepAliveTimeMinutes: 6

一般需要进行以下配置:
(1) 修改应用上下文路径(可选):默认为lczServer,如果访问地址中需要重命名,那么需要修改 server-> servlet -> context-path。同时,nginx.conf文件中也做对应调整。
(2) 调整微服务端口(可选):如果默认的微服务端口已经被占用,可用过 server->port 属性进行调整。

3 配置微服务内存

windows、linux(uos、麒麟)服务器下,分别打开startup.bat/startup.sh文件,按需调整-Xmx的值。

作者:柳杨  创建时间:2025-01-09 17:43
最后编辑:柳杨  更新时间:2025-04-22 15:31