【 More reference 】https://www.cnblogs.com/niejunlei/p/5977895.html

To configure _DruidDataSource Reference configuration

The following is a reference connection pool configuration :

 <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- Database driven -->
<property name="driverClassName" value="${jdbc.driverClassName}" />
<!-- Basic attributes url、user、password -->
<property name="url" value="${jdbc_url}" />
<property name="username" value="${jdbc_user}" />
<property name="password" value="${jdbc_password}" />
<!-- Configure initialization size 、 Minimum 、 Maximum -->
<property name="initialSize" value="1" />
<property name="minIdle" value="1" />
<property name="maxActive" value="20" />
<!-- Configure the timeout time for getting connection waiting -->
<property name="maxWait" value="60000" />
<!-- Configure how often to test , Detects idle connections that need to be closed , In milliseconds -->
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<!-- Configure the minimum lifetime of a connection in the pool , In milliseconds -->
<property name="minEvictableIdleTimeMillis" value="300000" />
<property name="validationQuery" value="SELECT 'x'" />
<property name="testWhileIdle" value="true" />
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<!-- open PSCache, And specify on each connection PSCache Size -->
<property name="poolPreparedStatements" value="true" />
<property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
<!-- Configure monitoring statistics interception filters -->
<property name="filters" value="stat" />
</bean>

Generally speaking , It just needs to be modified initialSize、minIdle、maxActive.

If you use Oracle, Then put poolPreparedStatements Configure to true,mysql Can be configured as false. Database with more sub databases and sub tables , Recommended configuration is false.

druid FAQ summary :

https://github.com/alibaba/druid/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98

Druid Study --- To configure _DruidDataSource Refer to more articles on configuration

  1. To configure _DruidDataSource Reference configuration

    To configure _DruidDataSource Reference configuration <!-- Database driven --> <property name="driverClassName" value=&quo ...

  2. Druid To configure _DruidDataSource Reference configuration

    The following is a reference connection pool configuration : <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource ...

  3. Druid Reference configuration

    pom Medium maven dependency <dependency>            <groupId>com.alibaba</groupId>       ...

  4. by Druid Monitor configuration access ( Configure the user and password to access the monitoring information )

    turn : l by Druid Monitor configuration access ( Configure the user and password to access the monitoring information ) 2014-09-26 09:21:48         source :renfufei The column    Collection    I want to contribute   Druid It's one ...

  5. NodeJS Learning summary 01 Installation configuration

    1 install NodeJS Refer to published articles for details Ubuntu Learning summary -07 Nodejs and npm Installation 2 Use Taobao NPM Mirror image Domestic direct use npm The official image is very slow , Taobao is recommended here NPM Mirror image ...

  6. Emacs Learning experience Basic configuration

    author : Fengxueting Source :http://www.cnblogs.com/FengXueTing-px/ Welcome to reprint Emacs Learning experience Basic configuration 1. Preface 2. Basic configuration One . Preface This blog post records Emacs One ...

  7. GitHub Learning experience Installation configuration and multi account management

    author : Fengxueting Source :http://www.cnblogs.com/FengXueTing-px/ Welcome to reprint GitHub Learning experience Installation configuration and multi account management 1. Preface 2.GitHub Linux install (ub ...

  8. CentOS 7 Study ( One ) To configure LAMP and Nginx

    CentOS 7 Study ( One ) To configure LAMP and Nginx CentOS yes RedHat Linux The compiled version of the enterprise version of the code , It belongs to a common server Linux edition , It is said that Ubuntu Server A more general , ha-ha , however ...

  9. Druid Connection pool introduction and configuration

    Druid What is it? ? What's the role ?  Druid The first is a database connection pool , But it's not just a database connection pool , It also contains a ProxyDriver, A series of built-in JDBC Component library , One SQL Parser. Druid ...

Random recommendation

  1. Kivy Chinese display

    Win7 System download DroidSansFallback.ttf typeface (android It comes with the device ) The first line of source code adds #-*- coding:utf-8 -*- establish widget Value determination font_name s ...

  2. opencv 1.0 And 2.0 The library corresponding table of

    libcvaux.so.2 -> /usr/lib/libopencv_video.so.2.2.0 libcv.so.2 -> /usr/lib/libopencv_legacy.so. ...

  3. Win7 Refresh environment variable

    stay “ My computer ”->“ attribute ”->“ senior ”->“ environment variable ” After adding or modifying environment variables in , You need to restart the system to make it work . Is there any way to make it work immediately ? Here's a way : To modify environment variables “PATH” ...

  4. Windows How to use calculator

    (1)Backspace: Backspace , Delete the last digit in the current input number (2)CE: eliminate , Clear the displayed number . (3)C: Zeroing , Clear the current calculation . (4)MC: Clear the value in the memory . (5)MR: Display the number stored in the memory ...

  5. Jquery Take the attribute value ( Check box 、 The drop-down list 、 Radio button )、 Make the select all button 、JSON Storage 、 Go to space

    1.jquery Take the value of the check box <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt ...

  6. Lintcode395 Coins in a Line II solution Answer key

    [ Title Description ] There are n coins with different value in a line. Two players take turns to take one or two c ...

  7. Jetty Development of guidelines : Embedded development HelloWorld

    Jetty  Embedded  HelloWorld This section provides a tutorial , Demonstrate how to quickly develop for Jetty API Embedded code for . 1. download Jar package Jetty It's broken down into many jar And dependencies , By choosing the smallest jar Set ...

  8. vue Add Alibaba vector graph to the project

    1. Select the icon you want , Add to cart 2. Open the shopping cart , Add to my project 3. Open the list of projects - More operations - Editing project modify FontClass/Symbol Prefix , Customize a name , for example :v-icon-cu ...

  9. Tanzhou classroom 25 class :Ph201805201 Reptile base The tenth lesson The image processing - Extreme verification code ( Class notes )

    use python Of   selenium  visit   https://www.huxiu.com/ Pass the captcha automatically # -*- coding: utf-8 -*- # Binbin computer # @Time : 20 ...

  10. DS Binary tree -- The number of leaves

    Title Description Calculate the number of leaf nodes in a binary tree . Tips : A leaf means that its left and right children are empty . The construction method is “ The first sequence traversal + Empty trees use 0 Express ” Methods , That is, given a binary tree, the result of preorder traversal is AB0C00D00, The empty node uses the character ‘0 ...