标签:lib debug log4 val end abstract proxy exec exe
开发环境使用
spring
<bean id="log-filter" class="com.alibaba.druid.filter.logging.Slf4jLogFilter"> <property name="connectionLogEnabled" value="false"/> <property name="statementLogEnabled" value="false"/> <property name="resultSetLogEnabled" value="true"/> <property name="statementExecutableSqlLogEnable" value="true"/> </bean>
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close" abstract="true"> <property name="proxyFilters"> <list> <ref bean="log-filter"/> </list> </property> </bean>
log4j.xml
<logger name="druid.sql.Statement" additivity="false"> <level value="DEBUG"/> <appender-ref ref="consoleAppender"/> </logger>
标签:lib debug log4 val end abstract proxy exec exe
原文地址:https://www.cnblogs.com/zfzf1/p/8808235.html