• Druid数据源监控配置


    在web.xml中添加如下代码

    <!-- druid监控 -->
    <servlet>  
        <servlet-name>DruidStatView</servlet-name>  
        <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>  
        <!--   
            deny优先于allow,如果在deny列表中,就算在allow列表中,也会被拒绝。  
              如果allow没有配置或者为空,则允许所有访问  
         -->  
        <init-param>  
            <param-name>allow</param-name>  
            <param-value>10.12.5.170/16,127.0.0.1</param-value>  
        </init-param>  
        <init-param>  
            <param-name>deny</param-name>  
            <param-value>10.12.5.170</param-value>  
        </init-param>  
        <!-- 在StatViewSerlvet输出的html页面中,有一个功能是Reset All,执行这个操作之后,会导致所有计数器清零,重新计数 -->  
        <init-param>  
            <param-name>resetEnable</param-name>  
            <param-value>false</param-value>  
        </init-param>  
        <!-- 用户名和密码 -->  
        <init-param>  
            <param-name>loginUsername</param-name>  
            <param-value>druid</param-value>  
        </init-param>  
        <init-param>  
            <param-name>loginPassword</param-name>  
            <param-value>druid</param-value>  
        </init-param>  
    </servlet>  
    <servlet-mapping>  
        <servlet-name>DruidStatView</servlet-name>  
        <url-pattern>/druid/*</url-pattern>  
    </servlet-mapping> 
  • 相关阅读:
    8.5
    8.12
    8.11
    8.14
    8.15
    8.18
    8.16
    8.20
    Android新版NDK环境配置(免Cygwin)
    在Windows7上搭建Cocos2d-x win32开发环境
  • 原文地址:https://www.cnblogs.com/gavinYang/p/11196518.html
Copyright © 2020-2023  润新知