91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

在SpringMVC項目中使用HIkariCP

發布時間:2020-07-15 13:30:08 來源:網絡 閱讀:722 作者:alterem 欄目:編程語言
什么是HIkariCP

https://www.jianshu.com/p/15b846107a7c

使用HikariCP數據源
pom.xml
<dependency>
  <groupId>com.zaxxer</groupId>
  <artifactId>HikariCP</artifactId>
  <version>3.3.1</version>
</dependency>
Spring-mvc.xml
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="shutdown">
        <property name="driverClassName" value="${jdbc.driver}" />
        <property name="jdbcUrl" value="${jdbc.url}" />
        <property name="username" value="${jdbc.username}" />
        <property name="password" value="${jdbc.password}" />
        <property name="connectionTestQuery" value="SELECT 1" />
        <!-- 生效超時 -->
        <property name="validationTimeout" value="3000" />
        <!-- 連接只讀數據庫時配置為true, 保證安全 -->
        <property name="readOnly" value="false" />
        <!-- 等待連接池分配連接的最大時長(毫秒),超過這個時長還沒可用的連接則發生SQLException, 缺省:30秒 -->
        <property name="connectionTimeout" value="60000" />
        <!-- 一個連接idle狀態的最大時長(毫秒),超時則被釋放(retired),缺省:10分鐘 -->
        <property name="idleTimeout" value="60000" />
        <!-- 一個連接的生命時長(毫秒),超時而且沒被使用則被釋放(retired),缺省:30分鐘,建議設置比數據庫超時時長少30秒,參考MySQL
            wait_timeout參數(show variables like '%timeout%';) -->
        <property name="maxLifetime" value="60000" />
        <!-- 連接池中允許的最大連接數。缺省值:10;推薦的公式:((core_count * 2) + effective_spindle_count) -->
        <property name="maximumPoolSize" value="10" />
    </bean>
啟動成功日志
17:36:50.838 [main] WARN  com.zaxxer.hikari.HikariConfig - HikariPool-1 - idleTimeout has been set but has no effect because the pool is operating as a fixed size pool.
17:36:50.838 [main] DEBUG com.zaxxer.hikari.HikariConfig - HikariPool-1 - configuration:
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - allowPoolSuspension.............false
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - autoCommit......................true
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - catalog.........................none
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - connectionInitSql...............none
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - connectionTestQuery............."SELECT 1"
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - connectionTimeout...............60000
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - dataSource......................none
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceClassName.............none
17:36:50.841 [main] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceJNDI..................none
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceProperties............{password=<masked>}
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - driverClassName................."com.mysql.jdbc.Driver"
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - healthCheckProperties...........{}
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - healthCheckRegistry.............none
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - idleTimeout.....................60000
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - initializationFailTimeout.......1
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - isolateInternalQueries..........false
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - jdbcUrl.........................jdbc:mysql://ykx.uerp.net:3306/ykx?useUnicode=true&characterEncoding=utf8
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - leakDetectionThreshold..........0
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - maxLifetime.....................60000
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - maximumPoolSize.................10
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - metricRegistry..................none
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - metricsTrackerFactory...........none
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - minimumIdle.....................10
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - password........................<masked>
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - poolName........................"HikariPool-1"
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - readOnly........................false
17:36:50.843 [main] DEBUG com.zaxxer.hikari.HikariConfig - registerMbeans..................false
17:36:50.844 [main] DEBUG com.zaxxer.hikari.HikariConfig - scheduledExecutor...............none
17:36:50.844 [main] DEBUG com.zaxxer.hikari.HikariConfig - schema..........................none
17:36:50.844 [main] DEBUG com.zaxxer.hikari.HikariConfig - threadFactory...................internal
17:36:50.844 [main] DEBUG com.zaxxer.hikari.HikariConfig - transactionIsolation............default
17:36:50.844 [main] DEBUG com.zaxxer.hikari.HikariConfig - username........................"ykx"
17:36:50.844 [main] DEBUG com.zaxxer.hikari.HikariConfig - validationTimeout...............3000
17:36:50.844 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
17:36:51.257 [main] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection com.mysql.jdbc.JDBC4Connection@1d77a31d
17:36:51.260 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

常州市| 正阳县| 焦作市| 朝阳区| 安康市| 合川市| 静安区| 四会市| 瓦房店市| 曲阳县| 澜沧| 漾濞| 长沙市| 阿拉尔市| 体育| 北票市| 米脂县| 新郑市| 沁阳市| 苏尼特右旗| 崇文区| 寻乌县| 诏安县| 汉川市| 缙云县| 浮山县| 宽甸| 五华县| 宁国市| 永清县| 铁力市| 博乐市| 开江县| 牡丹江市| 中西区| 芦溪县| 黄陵县| 德化县| 页游| 金寨县| 宜城市|