配置druid监控spring jdbc代码

    <bean id="druid-stat-interceptor"

class="com.alibaba.druid.support.spring.stat.DruidStatInterceptor">

    </bean>

    <bean id="druid-stat-pointcut"                                       class="org.springframework.aop.support.JdkRegexpMethodPointcut" scope="prototype">

<property name="patterns">

<list>

<value>net.abcd..service.*</value>

</list>

</property>

</bean>

<aop:config>

<aop:advisor advice-ref="druid-stat-interceptor" 

                                        pointcut-ref="druid-stat-pointcut" />

</aop:config>


本文出自 “一直在爬坑” 博客,谢绝转载!

你可能感兴趣的:(spring,jdbc,监控)