我自己找到了一个地方,主要代码如下: public class DruidMonitorService { public static final String SQL_QUERY_DETAIL = "/sql.json?orderBy=SQL&orderType=desc&page=1&perPageCount=1000000&"; public static final String REST_ALL = "/reset-all.json";
private DruidStatService service;
private static DruidMonitorService instance = new DruidMonitorService();
public static DruidMonitorService getInstance() {
return instance;
}
private DruidMonitorService() {
service = DruidStatService.getInstance();
}
/**
* 上报并清空
*
* @return
*/
public String reportAndClear() {
String result = service.service(SQL_QUERY_DETAIL);
DruidStatService.getInstance().service(REST_ALL);
return result;
}
2条答案
按热度按时间sz81bmfz1#
我自己找到了一个地方,主要代码如下:
public class DruidMonitorService {
public static final String SQL_QUERY_DETAIL = "/sql.json?orderBy=SQL&orderType=desc&page=1&perPageCount=1000000&";
public static final String REST_ALL = "/reset-all.json";
}
fslejnso2#
https://github.com/alibaba/druid/wiki/%E6%80%8E%E4%B9%88%E4%BF%9D%E5%AD%98Druid%E7%9A%84%E7%9B%91%E6%8E%A7%E8%AE%B0%E5%BD%95
在wiki看到的
spring boot start druid 那里也有
https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter
如果解决了,可以关闭issue