druid监控

StatViewServlet的用途包括:

提供监控信息展示的html页面
提供监控信息的JSON API

@WebServlet(urlPatterns = "/druid/*",
initParams = {@WebInitParam(name="loginName",value = "admin"),
    @WebInitParam(name="loginPassword",value="admin")
})
public class DruidStatViewServlet extends StatViewServlet {
    private static final long serialVersionUID = 1L;

}

WebStatFilter用于采集web-jdbc关联监控的数据。

@WebFilter(filterName = "druidWebStatFilter",urlPatterns = "/*",
initParams = {@WebInitParam(name="exclusions",value="*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*")})
public class DruidStatFilter extends WebStatFilter {

}

访问
http://127.0.0.1:8080/ts-web-app/druid

druid监控_第1张图片

你可能感兴趣的:(数据库)