JDBC 连接池、监控组件 Druid

码农软件 · 软件分类 · 数据库连接池 · 2019-09-03 18:12:17

软件介绍

Druid是一个JDBC组件,它包括三部分: 

  • DruidDriver 代理Driver,能够提供基于Filter-Chain模式的插件体系。 

  • DruidDataSource 高效可管理的数据库连接池。 

  • SQLParser 

Druid可以做什么? 

1) 可以监控数据库访问性能,Druid内置提供了一个功能强大的StatFilter插件,能够详细统计SQL的执行性能,这对于线上分析数据库访问性能有帮助。 

2) 替换DBCP和C3P0。Druid提供了一个高效、功能强大、可扩展性好的数据库连接池。 

3) 数据库密码加密。直接把数据库密码写在配置文件中,这是不好的行为,容易导致安全问题。DruidDruiver和DruidDataSource都支持PasswordCallback。 

4) SQL执行日志,Druid提供了不同的LogFilter,能够支持Common-Logging、Log4j和JdkLog,你可以按需要选择相应的LogFilter,监控你应用的数据库访问情况。 

扩展JDBC,如果你要对JDBC层有编程的需求,可以通过Druid提供的Filter-Chain机制,很方便编写JDBC层的扩展插件。 

如下是一个基于Druid内置扩展StatFilter的监控实现:

Druid 的 JavaDoc 文档请看

http://tool.oschina.net/apidocs/apidoc?api=druid0.26

本文地址:https://codercto.com/soft/d/13805.html

TED Talks Storytelling: 23 Storytelling Techniques from the Best

TED Talks Storytelling: 23 Storytelling Techniques from the Best

Akash Karia / CreateSpace Independent Publishing Platform / 2015-1-11 / USD 6.99

"Every speaker can put these ideas into practice immediately -- and they should!" ~ Dr. Richard C. Harris, Certified World Class Speaking Coach "An insightful read" ~Dennis Waller, Top 500 Revie......一起来看看 《TED Talks Storytelling: 23 Storytelling Techniques from the Best》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器