码迷,mamicode.com
首页 > 其他好文 > 详细

【SSM - druid 】配置与使用

时间:2020-01-28 23:27:45      阅读:82      评论:0      收藏:0      [点我收藏+]

标签:uid   com   ping   view   白名单   word   code   jpg   param   

web.xml 配置

    <!-- druid的监控页面配置开始 -->
    <servlet>
        <servlet-name>StatViewServlet</servlet-name>
        <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
        <!-- 配置登陆名 -->
        <init-param>
            <param-name>loginUsername</param-name>
            <param-value>root</param-value>
        </init-param>
        <!-- 配置密码 -->
        <init-param>
            <param-name>loginPassword</param-name>
            <param-value>root3306</param-value>
        </init-param>
        <!-- 设置白名单 -->
        <init-param>
            <param-name>allow</param-name>
            <!--  <param-value>192.168.1.1,192.168.2.4</param-value>s  -->
            <param-value></param-value>
        </init-param>
        <!-- 设置黑名单 -->
        <init-param>
            <param-name>deny</param-name>
            <param-value></param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>StatViewServlet</servlet-name>
        <url-pattern>/druid/*</url-pattern>
    </servlet-mapping>

    <filter>
        <filter-name>WebStatFilter</filter-name>
        <filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
        <!-- 注入过滤的样式文件 -->
        <init-param>
            <param-name>exclusions</param-name>
            <param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>WebStatFilter</filter-name>
        <servlet-name>StatViewServlet</servlet-name>
    </filter-mapping>
    <!-- druid的监控页面配置结束 -->

 访问  localhost:5103/druid

【SSM - druid 】配置与使用

标签:uid   com   ping   view   白名单   word   code   jpg   param   

原文地址:https://www.cnblogs.com/kikyoqiang/p/12238944.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!