# PAS Micro-配置项说明

# 内嵌容器

PAS-Micro内嵌容器配置项如下:

# 基础配置

# ip、端口绑定

server.address=172.26.48.1
server.port=8888

# 数据传输压缩配置

数据传输启用Gzip压缩

## compression
## 数据传输压缩
### 是否开启压缩
server.compression.enabled=true
### 指定要压缩的MIME type
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain
### 执行压缩的阈值
server.compression.min-response-size=2048

# HTTPS

# HTTPS

  1. 准备数字证书
  2. 修改配置文件如下
# https
## 是否开启https
server.ssl.enabled=true
## 密钥库位置
server.ssl.key-store=classpath:./key/rsa.jks
## 密钥库类型
server.ssl.key-store-type=pkcs12
## 密码
server.ssl.key-store-password=123456

# HTTP转HTTPS

配置http→https转向

  • application配置文件
# http转https端口用
http.port=8000

server.address=172.26.48.1
server.port=8888

# https
## 是否开启https
server.ssl.enabled=true
## 密钥库位置
server.ssl.key-store=classpath:./key/rsa.jks
## 密钥库类型
server.ssl.key-store-type=pkcs12
## 密码
server.ssl.key-store-password=123456
  • 配置类
@Configuration
public class AppServerConfig {

    @Value("${http.port}")
    Integer httpPort;

    @Value("${server.port}")
    Integer httpsPort;

    @Bean
    public PasServletWebServerFactory servletContainer() {
        PasServletWebServerFactory pasServer = new PasServletWebServerFactory() {
            @Override
            protected void postProcessContext(Context context) {
                SecurityConstraint securityConstraint = new SecurityConstraint();
                securityConstraint.setUserConstraint("CONFIDENTIAL");//confidential
                SecurityCollection collection = new SecurityCollection();
                collection.addPattern("/*");
                securityConstraint.addCollection(collection);
                context.addConstraint(securityConstraint);
            }
        };
        pasServer.addAdditionalPasConnectors(httpConnector());
        return pasServer;
    }

    @Bean
    public Connector httpConnector() {
        Connector connector = new Connector("com.primeton.pas.coyote.http11.Http11NioProtocol");
        connector.setScheme("http");
        connector.setPort(httpPort);
        connector.setSecure(false);
        connector.setRedirectPort(httpsPort);
        return connector;
    }
}

# HTTP2

HTTP2协议的升级需要基于HTTPS

## http2
## http2使用环境 JDK1.9以上,并基于https
## 不符合使用环境默认http1.1
server.http2.enabled=true

# 国密SSL

  1. 准备国密数字证书
  2. 准备国密浏览器
  1. 国密SDK准备
  • gmssl_provider.jar (国密SSL实验室下载)
  1. 基础运行环境
  • JRE1.8
  • 国密Java包gmssl_provider.jar放到JRE的lib/ext/目录下
  • JRE的加密策略需要切换到unlimited模式,更改安全文件JRE下lib/security/java.security如下
# 加密策略切换到unlimited模式
crypto.policy=unlimited

注意: 如果JRE的加密策略unlimited设置无效,访问链接https://blog.csdn.net/dling8/article/details/84061948 (opens new window)

  1. 部署
  • pas国密组件gmssl-pas.jar放在项目/lib下
  • pom文件引入gmssl-pas.jar本地依赖
<dependency>
    <groupId>com.primeton.appserver</groupId>
    <artifactId>appserver-embed-gmssl</artifactId>
    <version>6.5.0</version>
</dependency>
  1. 配置示例(单向)
  • application.properties配置
server.ssl.enabled=true
# 密钥库
server.ssl.key-store=classpath:./key/sm2.localhost.both.pfx
# 密钥库类型
server.ssl.key-store-type=pkcs12
# 密码
server.ssl.key-store-password=12345678
# 采用协议
server.ssl.protocol=GMSSLv1.1
  • 配置类
@Configuration
public class AppServerConfig {

    @Bean
    public AppServerServletWebServerFactory servletWebServerFactory(ApplicationContext applicationContext) {
        AppServerServletWebServerFactory servletWebServerFactory = new AppServerServletWebServerFactory();
        servletWebServerFactory.setApplicationContext(applicationContext);
        servletWebServerFactory.addConnectorCustomizers((connector -> {
            ProtocolHandler handler = connector.getProtocolHandler();
            ((AbstractHttp11JsseProtocol<?>) handler).setSslImplementationName("com.primeton.appserver.gmssl.GMSSLImplementation");
        }));
        return servletWebServerFactory;
    }
}

协议GMSSLv1.1、GMSSLv1.0支持

# Pas配置

# License

server.pas.primeton-license=/opt/license/primetonlicense.xml

# 日志

accesslog日志配置如下

# pas
## log
server.pas.accesslog.enabled=true 
server.pas.accesslog.pattern=%t [%a] [%b] [%m] [%s] [%D] [%S] [%I] [%H://%v%U%q]
server.pas.accesslog.file-date-format=yyyy-MM-dd
server.pas.accesslog.directory=logs
server.pas.accesslog.prefix=pas_access_log
server.pas.accesslog.suffix=.log
server.pas.basedir=./pas

注意: 如果没有指定pas目录(server.pas.basedir),则pas目录为临时目录,此时日志目录只能设置为 绝对路径,否则设置无效。

# Connector参数

并发配置

## turning
## 最小线程数
server.pas.threads.min-spare=100
## 最大线程数
server.pas.threads.max=500
## 最大连接数
server.pas.max-connections=10000
## 请求队列大小
server.pas.accept-count=100

# Servlet配置

# 基础Servlet配置

配置上下文

# servlet
## servlet-base
server.servlet.context-path=/pas
server.servlet.application-display-name=application

# cookie、session配置

## cookie、session
server.servlet.session.timeout=120s
#server.servlet.session.cookie.max-age=60s
server.servlet.session.cookie.comment=comment
## jsessionid 自定义名
server.servlet.session.cookie.name=self_session

# Web

# Servlet(@WebServlet)

Servlet的使用:

  • Servlet类
@WebServlet(name = "DemoServlet", urlPatterns = {"/demoServlet"})   // 开启Servlet注解,并配置url
public class DemoServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        StringBuffer requestURL = req.getRequestURL();
        log.warn("com.example.demo.web.DemoServlet -- {}", requestURL);
    }
}
  • 启动类加@ServletComponentScan注解
@ServletComponentScan
@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}

# Filter(@WebFilter)

过滤器的使用

  • 过滤器类
// 过滤器名,过滤url
@WebFilter(filterName = "demoFilter", urlPatterns = "/*")
public class DemoFilter implements Filter {

    private String url;

    @Override
    public void init(FilterConfig filterConfig) {
        log.info("init Filter:{}", filterConfig.getFilterName());
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        log.info("start to Filter ...");
        long startTime = System.currentTimeMillis();
        chain.doFilter(request, response);
        long endTime = System.currentTimeMillis();
        String url = getUrlFrom(request);
        log.info("the request of {} consumes {}ms.", url, (endTime - startTime));
        log.info("end to Filter ...");
    }

    @Override
    public void destroy() {
        log.info("filter destroy ...");
    }

    private String getUrlFrom(ServletRequest servletRequest) {
        if (servletRequest instanceof HttpServletRequest) {
            return ((HttpServletRequest) servletRequest).getRequestURL().toString();
        }

        return "";
    }
}
  • 启动类加@ServletComponentScan注解
@ServletComponentScan
@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}

# Listener(@WebListener)

监听器的使用

- 监听器类
@WebListener
public class DemoListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        log.warn("com.example.demo.web.DemoListener -- Server startup ...");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        log.warn("com.example.demo.web.DemoListener -- Server shutdown ...");
    }
}
  • 启动类加@ServletComponentScan注解
@ServletComponentScan
@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}

# SpringMVC(@RestController)

@RestController
public class PasController {

    @RequestMapping("/lazy")
    public String lazy() throws InterruptedException {
        Thread.sleep(2000);
        return "lazy...";
    }
}

# 视图

# Thymeleaf

  • application配置文件
# thymeleaf
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=LEGACYHTML5
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.cache=false
  • 添加thymeleaf依赖
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

# JSP

  • jsp文件位置
    手动添加src/main/webapp,然后在webapp下创建WEB-INF文件夹,以后的jsp文件就放在WEB-INF下面
  • 配置文件
# jsp
spring.mvc.view.prefix=/WEB-INF/
spring.mvc.view.suffix=.jsp
  • jsp相关依赖
<!-- springboot 1.x和2.x 依赖这个 -->
<dependency>
    <groupId>com.primeton.epas.embed</groupId>
    <artifactId>pas-embed-jasper</artifactId>
</dependency>

<!-- springboot 3.x 依赖这个 -->
<dependency>
    <groupId>com.primeton.epas</groupId>
    <artifactId>pas-embed-jasper</artifactId>
</dependency>
  • 配置maven resouces节点
<resources>
    <resource>
        <directory>src/main/webapp</directory>
        <targetPath>META-INF/resources</targetPath>
        <includes>
            <include>*.*</include>
        </includes>
    </resource>
</resources>
  • 插件
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <version>1.4.2.RELEASE</version>
</plugin>

# jsp和thymeleaf多视图整合

  • 配置多视图解析器
@Configuration
@EnableWebMvc
@ComponentScan
public class WebViewConfig implements WebMvcConfigurer {
    /**
     * @Description: 注册jsp视图解析器
     */
    @Bean
    public ViewResolver viewResolver() {
        InternalResourceViewResolver resolver = new InternalResourceViewResolver();
        resolver.setPrefix("/WEB-INF/"); //配置放置jsp文件夹
        resolver.setSuffix(".jsp");
        resolver.setViewNames("jsp/*");  //重要 setViewNames 通过它识别为jsp页面引擎
        resolver.setOrder(2);
        return resolver;
    }

    /**
     * @Description: 注册html视图解析器
     */
    @Bean
    public ITemplateResolver templateResolver() {
        SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver();
        templateResolver.setTemplateMode("HTML");
        templateResolver.setPrefix("classpath:/templates/");
        templateResolver.setSuffix(".html");
        templateResolver.setCharacterEncoding("utf-8");
        templateResolver.setCacheable(false);
        return templateResolver;
    }

    /**
     * @Description: 将自定义tml视图解析器添加到模板引擎并主持到ioc
     */
    @Bean
    public SpringTemplateEngine templateEngine() {
        SpringTemplateEngine templateEngine = new SpringTemplateEngine();
        templateEngine.setTemplateResolver(templateResolver());
        return templateEngine;
    }

    /**
     * @Description: Thymeleaf视图解析器配置
     */
    @Bean
    public ThymeleafViewResolver viewResolverThymeLeaf() {
        ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
        viewResolver.setTemplateEngine(templateEngine());
        viewResolver.setCharacterEncoding("utf-8");
        viewResolver.setViewNames(new String[]{"thymeleaf"});
        viewResolver.setOrder(1);
        return viewResolver;
    }

    @Override
    public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
    }

    /**
     * @Description: 配置静态文件映射
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**").addResourceLocations("/WEB-INF/static/");
    }
}

# 响应式

Spring WebFlux,PAS服务器支持响应式编程。

  • 依赖
<dependency>
    <groupId>com.primeton.epas</groupId>
    <artifactId>pas-spring-boot-2.x-starter</artifactId>
    <version>6.5.2.100</version>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </exclusion>
    </exclusions>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webflux</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-reactor-netty</artifactId>
        </exclusion>
    </exclusions>
</dependency>
  • 配置application.properties
spring.main.web-application-type=reactive
  • 例子
@RestController
public class WebFluxTest {

    @GetMapping("/test01")
    public String test01(){
        return "test01";
    }

    @GetMapping("/test02")
    public Mono<String> test02(){
        return Mono.just("test02...");
    }
}

# WebSocket使用

参考原生@EnableWebSocket和@ServerEndpoint使用方式

# 内嵌控制台

PAS-Micro内嵌控制台配置项如下:

配置项 描述 默认值
pas.admin.client.ui.enabled 是否启用pas内嵌控制台ui false
pas.admin.client.ui.resource-locations pas内嵌控制台ui资源位置 classpath:META-INF/pas-micro-embed-ui/
pas.admin.client.ui.context-path pas内嵌控制台上下文路径 /pas
pas.admin.client.ui.cache.max-age 在 Cache-Control http 标头中包含“max-age”指令(单位:秒) 3600
pas.admin.client.ui.cache.no-cache 在 Cache-Control http 标头中包含“no-cache”指令 false
pas.admin.client.ui.cache.no-store 在 Cache-Control http 标头中包含“no-store”指令 false
pas.admin.client.actuator.http-statistics.enabled 是否启用http请求统计 true
pas.admin.client.actuator.http-statistics.top-k 统计显示的http请求记录数 10
pas.admin.client.actuator.http-statistics.slow-request-threshold 慢请求阈值(单位:毫秒) 10000
pas.admin.client.actuator.http-statistics.async 异步记录httptrace true
pas.admin.client.actuator.http-statistics.exclude-paths 统计时排除的http请求路径
pas.admin.client.actuator.http-statistics.exclude-actuator-url 统计时排除actuator请求 true

# 客户端

PAS-Micro客户端配置项如下:

配置项 描述 默认值
pas.admin.client.enabled 是否启用pas客户端 true
pas.admin.client.url 注册的统一管理控制台 URL
pas.admin.client.username 注册的统一管理控制台上基本身份验证的用户名
pas.admin.client.password 注册的统一管理控制台上基本身份验证的用密码
pas.admin.client.api-path 注册的统一管理控制台的Rest API请求路径 instances
pas.admin.client.period 重复注册的时间间隔(单位:毫秒) 10000
pas.admin.client.connect-timeout 注册连接超时时间(单位:毫秒) 5000
pas.admin.client.read-timeout 注册读取超时时间(单位:毫秒) 5000
pas.admin.client.auto-deregistration 应用关闭时自动注销,如未设置,则存在活动的CloudPlatform时默认为true
pas.admin.client.auto-registration 应用启动时自动注册 true
pas.admin.client.register-once 启用针对一个或所有统一管理控制台的注册 true
pas.admin.client.instance.management-url 用于注册的管理 URL。在运行时推断,如果可到达的 URL 不同(例如 Docker),则可以覆盖
pas.admin.client.instance.management-base-url 用于计算要注册的管理 URL 的基本 URL。路径在运行时推断,并附加到基本 URL
pas.admin.client.instance.service-url 客户端-服务-URL 注册。在运行时推断,如果可访问 URL 不同(例如 Docker),则可以被覆盖
pas.admin.client.instance.service-base-url 用于计算要注册的服务 URL 的基础 URL。路径在运行时推断,并附加到基础 URL
pas.admin.client.instance.service-path 计算要注册的服务 URL 的路径。如果未指定,则默认为“/”
pas.admin.client.instance.health-url 要注册的客户端健康检查 URL。在运行时推断,如果可访问 URL 不同(例如 Docker),则可以覆盖。所有服务注册表都必须唯一
pas.admin.client.instance.name 注册的应用名称 ${spring.application.name}
pas.admin.client.instance.group 注册的应用分组 default
pas.admin.client.instance.service-host-type 注册的 URL 应该用 server.address 还是 hostname 来构建 canonical_host_name
pas.admin.client.instance.metadata 与此应用程序关联的元数据
pas.admin.client.instance.prefer-ip-v6 使用ipv6 false
pas.admin.client.actuator.filter.enabled 是否启用actuator请求拦截身份验证 true
pas.admin.client.httptrace.queue-capacity httptrace缓存队列阈值 1000
pas.admin.client.httptrace.register-period httptrace服务端登记间隔时间(单位:毫秒) 10000
pas.admin.client.httptrace.scheduled-period httptrace定时任务间隔时间(单位:毫秒) 1000
pas.admin.client.healthcheck.enable 是否启用客户端健康检查 true
pas.admin.client.healthcheck.scheduled-period 健康检查定时任务间隔时间(单位:秒) 60

# 统一控制台

# 控制台

PAS-Micro控制台对应的配置文件为application.ymlapplication.properties,配置项如下:

配置项 描述 默认值
pas.admin.server.enabled 是否启用pas管理控制台服务 true
pas.admin.context-path context-path 为控制台静态资源和 API 的路径添加前缀。相对于 Dispatcher-Servlet
pas.admin.monitor.status-interval 检查实例状态的时间间隔(单位:毫秒) 10000
pas.admin.monitor.status-lifetime 状态的生命周期。只要最后的状态未过期,状态就不会更新(单位:毫秒) 10000
pas.admin.monitor.status-max-backoff 状态检查重试的最大退避时间(单位:毫秒,错误后的重试具有指数退避时间,最小退避时间为 1 秒) 60000
pas.admin.monitor.info-interval 检查实例信息的时间间隔(单位:分钟) 1
pas.admin.monitor.info-max-backoff 信息检查重试的最大退避时间(单位:分钟,错误后的重试具有指数退避时间,最小退避时间为 1 秒) 10
pas.admin.monitor.info-lifetime 信息的生命周期。只要最后一条信息未过期,信息就不会更新(单位:分钟) 1
pas.admin.monitor.default-retries 失败请求的默认重试次数。可以使用“pas.admin.monitor.retries.*”覆盖特定端点的单独值 0
pas.admin.monitor.retries 每个端点 ID 的重试次数。默认为default-retries设置的值
pas.admin.monitor.default-timeout 发出请求时的默认超时。可以使用“pas.admin.monitor.timeout.*”覆盖特定端点的单独值(单位:毫秒) 10000
pas.admin.monitor.timeout 每个端点 ID 的超时时间。默认为default-timeout设置的值
pas.admin.instance-auth.enabled 是否使用配置属性作为实例凭证的来源 true
pas.admin.instance-auth.default-user-name 用于对每个实例进行身份验证的默认用户名。可以使用“pas.admin.instance-auth.service-map.*.user-name”覆盖特定实例的各个值
pas.admin.instance-auth.default-password 用于对每个实例进行身份验证的默认用户密码。可以使用“pas.admin.instance-auth.service-map.*.user-password”覆盖特定实例的单独值
pas.admin.instance-auth.service-map 每个注册服务名称的实例凭证映射
pas.admin.httpTrace.ignored-suffixes httptrace统计时忽略的静态资源后缀名
pas.admin.elasticsearch.repository.enabled 启用ES存储(默认实例的httptrace使用内置h2数据库存储) false
pas.admin.map-store.write-delay-seconds Hazelcast的MapStore持久化数据延迟时间(单位:秒,时间越短,可能丢失的实例事件越少,但是性能越低;时间越长,可能丢失的实例事件越多,但是性能越高) 1

# 应用综合评分

PAS-Micro应用综合评分是根据健康检查配置的指标阈值和占比计算出来的,可以通过修改这些配置项(可在application.ymlapplication.properties中修改)来修改应用综合评分逻辑。

健康检查阈值的配置项如下:

配置项 描述 默认值
pas.threshold.diskUseRate.limit 硬盘使用率上限, 超过上限减少评分,1-100整数 80
pas.threshold.memoryUseRate 内存使用率上限, 超过上限减少评分, 1-100整数 80
pas.threshold.cpuUseRate cpu使用率上限, 超过上限减少评分, 1-100整数 80
pas.threshold.responseTimeout 慢请求阈值, 单位毫秒 10000

健康指数中各项指标的分数占比, 6项指标占比相加值等于1,配置项如下:

配置项 描述 默认值
pas.health.cpuWeight cpu使用率评分占比 0.15
pas.health.diskWeight 内存使用率评分占比 0.15
pas.health.memoryWeight 硬盘使用率评分占比 0.15
pas.health.abnormalWeight 异常率评分占比 0.20
pas.health.slowWeight 慢请求评分占比 0.20
pas.health.alarmWeight 告警评分占比 0.15

# 应用巡检

PAS-Micro应用巡检对应的配置文件为inspection.properties,配置项如下:

配置项 描述 默认值
pas.inspection.duration 每次巡检的持续时间(单位:秒):默认10分钟 (600秒) 600
pas.inspection.period 每次巡检的间隔时间(单位:秒):默认10秒 10
pas.inspection.saveAllDetail 巡检时保存所有明细:true为保留(用于调试模式),false为不保留,只将异常值保留,用于生产模式 false
pas.inspection.rate.digital.num 计算占比的保留小数位数: 默认为3位小数 3
pas.inspection.exclude.actuator 是否排除/actuator/*, true, 生产模式;false, 不排除,调试模式 true
pas.inspection.log.time.pattern PAS 日志的时间字段的pattern yyyy-MM-dd HH:mm:ss.SSS
pas.threshold.slowResponseTime 慢请求响应时间上限阈值(单位为毫秒):10秒 10000
pas.threshold.avgResponseTime 平均响应上限时间阈值(单位为毫秒):5秒 5000
pas.threshold.avgResponseTime.fatal 平均响应严重慢请求上限时间阈值(单位为毫秒):10秒 10000
pas.threshold.maxResponseTime 最大响应上限时间阈值(单位为毫秒):30秒 30000
pas.threshold.maxResponseTime.fatal 最大响应上限时间阈值(单位为毫秒):120秒 120000
pas.threshold.exceptionResponseRate 异常响应占比上限阈值,10% 0.1
pas.threshold.exceptionResponseRate.fatal 异常请求占比严重上限阈值,50% 0.5
pas.threshold.slowRequestRate 慢请求占比上限阈值,10% 0.1
pas.threshold.slowRequestRate.fatal 慢请求占比严重上限阈值,50% 0.5
pas.threshold.diskFree.lowerLimit 可用磁盘空间下限阈值(单位为字节):500M 524288000
pas.threshold.diskFreeRate.lowerLimit 可用磁盘空间占比下限阈值:10% 0.1
pas.threshold.usedHeapRate 已用堆内存占比上限阈值:90% 0.9
pas.threshold.avgUsedHeapRate 平均已用堆内存占比上限阈值:80% 0.8
pas.threshold.usedNonHeapRate 最大已用非堆内存占比上限阈值:85% 0.85
pas.threshold.sysCPU 系统CPU使用率上限阈值:90% 0.9
pas.threshold.avgSysCPU 平均系统CPU使用率上限阈值:70% 0.7
pas.threshold.procCPU 进程CPU使用率上限阈值:90% 0.9
pas.threshold.avgProcCPU 平均进程CPU使用率上限阈值:70% 0.7
pas.threshold.httpThreadRate 当前/最大HTTP线程池占比上限阈值:90% 0.9
pas.threshold.avgHttpThreadRate 平均HTTP线程池占比上限阈值:70% 0.7
pas.threshold.connectionRate 当前/最大连接池占比上限阈值:90% 0.9
pas.threshold.avgConnectionRate 平均连接池占比上限阈值:70% 0.7
pas.threshold.maxConnectionRate 最大连接池占比上限阈值:95% 0.95