Examples of configFromProperties()


Examples of com.alibaba.druid.filter.logging.Log4jFilter.configFromProperties()

            properties.setProperty("druid.log.conn", "true");
            properties.setProperty("druid.log.stmt", "true");
            properties.setProperty("druid.log.rs", "true");
            properties.setProperty("druid.log.stmt.executableSql", "false");
           
            filter.configFromProperties(properties);
           
            Assert.assertEquals(true, filter.isConnectionLogEnabled());
            Assert.assertEquals(true, filter.isStatementLogEnabled());
            Assert.assertEquals(false, filter.isStatementExecutableSqlLogEnable());
            Assert.assertEquals(true, filter.isResultSetLogEnabled());
View Full Code Here

Examples of com.alibaba.druid.filter.logging.LogFilter.configFromProperties()

            properties.setProperty("druid.log.conn", "true");
            properties.setProperty("druid.log.stmt", "true");
            properties.setProperty("druid.log.rs", "true");
            properties.setProperty("druid.log.stmt.executableSql", "false");
           
            filter.configFromProperties(properties);
           
            Assert.assertEquals(true, filter.isConnectionLogEnabled());
            Assert.assertEquals(true, filter.isStatementLogEnabled());
            Assert.assertEquals(false, filter.isStatementExecutableSqlLogEnable());
            Assert.assertEquals(true, filter.isResultSetLogEnabled());
View Full Code Here

Examples of com.alibaba.druid.pool.ValidConnectionCheckerAdapter.configFromProperties()


public class ValidConnectionCheckerAdapterTest extends TestCase {
    public void test_adapter() throws Exception {
        ValidConnectionCheckerAdapter adapter = new ValidConnectionCheckerAdapter();
        adapter.configFromProperties(System.getProperties());
        Assert.assertTrue(adapter.isValidConnection(null, null, 10));
    }
}
View Full Code Here

Examples of net.csdn.hibernate.support.filter.CSDNStatFilterstat.configFromProperties()

    public void configure(Map configurationValues) {
        try {
            DruidDataSourceFactory.config(dataSource, configurationValues);

            CSDNStatFilterstat statFilterstat = new CSDNStatFilterstat();
            statFilterstat.configFromProperties(dataSource.getConnectProperties());
            dataSource.getProxyFilters().add(statFilterstat);
        } catch (SQLException e) {
            throw new IllegalArgumentException("config error", e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.