迷茫2017-04-18 10:32:20
1. Database access performance can be monitored. Druid provides a powerful StatFilter plug-in built-in, which can provide detailed statistics on SQL execution performance, which is helpful for online analysis of database access performance.
2. Database password encryption. Directly writing the database password in the configuration file is bad behavior and can easily lead to security issues. Both DruidDruiver and DruidDataSource support PasswordCallback.
3. SQL execution log. Druid provides different LogFilters, which can support Common-Logging, Log4j and JdkLog. You can select the corresponding LogFilter as needed to monitor the database access of your application.
4. Extend JDBC. If you have programming needs for the JDBC layer, you can use the Filter mechanism provided by Druid to easily write extension plug-ins for the JDBC layer.