【问题标题】:How to set threshold of SlowQueryReport interceptor of Tomcat in Spring Boot properties如何在Spring Boot属性中设置Tomcat的SlowQueryReport拦截器阈值
【发布时间】:2019-07-02 14:44:36
【问题描述】:

我们需要在我们的 Spring boot 应用程序中配置SlowQueryReport Tomcat 拦截器,特别是在属性文件中配置threshold 值。在网上找不到任何东西。有什么帮助吗?

【问题讨论】:

    标签: spring spring-boot tomcat


    【解决方案1】:

    我们在配置文件中使用了旧语法(见下文,注意给定的threshold)并且它有效:

    spring.datasource:
      tomcat.jdbc-interceptors: org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReport(threshold=10);any.other.tomcat.Interceptor
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-09
      • 1970-01-01
      • 1970-01-01
      • 2015-10-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多