Database connection pool Druid

1. What is Druid?
Druid is the best database connection pool in Java language. Druid provides powerful monitoring and scaling capabilities.
Download address: maven
central warehouse: http://central.maven.org/maven2/com/alibaba/druid/
Alibaba open source download: http://code.alibabatech.com/mvn/releases/com/alibaba/druid/snapshot
Version downloadhttp :
//code.alibabatech.com/mvn/snapshots/com/alibaba/druid/Get the

source code:
Driud is an open source project, the source code is hosted on github, the source code repository address is https://github.com/ alibaba/druid . At the same time, every time Druid releases the official version and snapshot, the source code will be packaged. You can find the source code of the relevant version from the above download address.

Configure
maven Druid versions after 0.1.18 are released to the maven central warehouse, so you only need to Just add the dependency to the project's pom.xml. E.g:
<dependency>        
  <groupId>com.alibaba</groupId>        
  <artifactId>druid</artifactId>        
  <version>${druid-version}</version>    
</dependency>


How to open Druid's monitoring and statistics function
Druid's monitoring and statistics function is implemented through filter-chain extension. If you want to open the monitoring and statistics function and configure StatFilter, see here: https://github.com/alibaba/druid/wiki/% E9%85%8D%E7%BD%AE_StatFilter

How to use Druid's built-in monitoring page The
built-in monitoring page is a Servlet, the specific configuration is here: https://github.com/alibaba/druid/wiki/%E9%85%8D

How to configure Web and Spring related monitoring in %E7%BD%AE_StatViewServlet%E9%85%8D%E7%BD%AE built-in monitoring?
Web correlation monitoring configuration
https://github.com/alibaba/druid/wiki/%E9%85%8D%E7%BD%AE_%E9%85%8D%E7%BD%AEWebStatFilter
Spring correlation monitoring configuration
https:// github.com/alibaba/druid/wiki/%E9%85%8D%E7%BD%AE_Druid%E5%92%8CSpring%E5%85%B3%E8%81%94%E7%9B%91%E6%8E %A7%E9%85%8D%E7%BD%AE

How to configure defense against SQL injection attacks
Druid provides WallFilter, which is based on SQL semantic analysis to achieve defense against SQL injection attacks. The specific configuration is here: https://github.com/alibaba/druid/wiki/%E9%85%8D%E7%BD%AE-wallfilter

Druid is there any reference configuration
for different business scenarios? You can use our reference configuration, but it is recommended You carefully read the relevant documents, and then make custom configurations after understanding. https://github.com/alibaba/druid/wiki/%E9%85%8D%E7%BD%AE_DruidDataSource%E5%8F%82%E8%80%83%E9%85%8D%E7%BD%AE How to configure Druid to

log SQL executed by JDBC : http://www.itpub.net/thread-1865296-1-1.html


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326253960&siteId=291194637