diff --git a/fine-druid/src/com/fr/third/alibaba/druid/stat/DruidStatManagerFacade.java b/fine-druid/src/com/fr/third/alibaba/druid/stat/DruidStatManagerFacade.java index 2a1616fb8..7261375ac 100644 --- a/fine-druid/src/com/fr/third/alibaba/druid/stat/DruidStatManagerFacade.java +++ b/fine-druid/src/com/fr/third/alibaba/druid/stat/DruidStatManagerFacade.java @@ -32,7 +32,6 @@ import com.fr.third.alibaba.druid.VERSION; import com.fr.third.alibaba.druid.pool.DruidDataSource; import com.fr.third.alibaba.druid.sql.visitor.SQLEvalVisitorUtils; import com.fr.third.alibaba.druid.support.http.stat.WebAppStatManager; -import com.fr.third.alibaba.druid.support.spring.stat.SpringStatManager; import com.fr.third.alibaba.druid.util.DruidDataSourceUtils; import com.fr.third.alibaba.druid.util.JdbcSqlStatUtils; import com.fr.third.alibaba.druid.util.StringUtils; @@ -87,7 +86,6 @@ public final class DruidStatManagerFacade { return; } - SpringStatManager.getInstance().resetStat(); WebAppStatManager.getInstance().resetStat(); resetSqlStat(); resetDataSourceStat(); diff --git a/fine-druid/src/com/fr/third/alibaba/druid/stat/DruidStatService.java b/fine-druid/src/com/fr/third/alibaba/druid/stat/DruidStatService.java index 92be9532d..c1f166ec3 100644 --- a/fine-druid/src/com/fr/third/alibaba/druid/stat/DruidStatService.java +++ b/fine-druid/src/com/fr/third/alibaba/druid/stat/DruidStatService.java @@ -35,7 +35,6 @@ import com.fr.third.alibaba.druid.support.http.stat.WebAppStatManager; import com.fr.third.alibaba.druid.support.json.JSONUtils; import com.fr.third.alibaba.druid.support.logging.Log; import com.fr.third.alibaba.druid.support.logging.LogFactory; -import com.fr.third.alibaba.druid.support.spring.stat.SpringStatManager; import com.fr.third.alibaba.druid.util.MapComparator; import com.fr.third.alibaba.druid.util.StringUtils; @@ -166,24 +165,9 @@ public final class DruidStatService implements DruidStatServiceMBean { return returnJSONResult(RESULT_CODE_SUCCESS, getWebSessionStatData(id)); } - if (url.startsWith("/spring.json")) { - return returnJSONResult(RESULT_CODE_SUCCESS, getSpringStatDataList(parameters)); - } - - if (url.startsWith("/spring-detail.json")) { - String clazz = parameters.get("class"); - String method = parameters.get("method"); - return returnJSONResult(RESULT_CODE_SUCCESS, getSpringMethodStatData(clazz, method)); - } - return returnJSONResult(RESULT_CODE_ERROR, "Do not support this request, please contact with administrator."); } - - private List> getSpringStatDataList(Map parameters) { - List> array = SpringStatManager.getInstance().getMethodStatData(); - return comparatorOrderBy(array, parameters); - } - + private List> getWebURIStatDataList(Map parameters) { List> array = WebAppStatManager.getInstance().getURIStatData(); return comparatorOrderBy(array, parameters); @@ -196,10 +180,7 @@ public final class DruidStatService implements DruidStatServiceMBean { private Map getWebSessionStatData(String sessionId) { return WebAppStatManager.getInstance().getSessionStat(sessionId); } - - private Map getSpringMethodStatData(String clazz, String method) { - return SpringStatManager.getInstance().getMethodStatData(clazz, method); - } + private List> getWebSessionStatDataList(Map parameters) { List> array = WebAppStatManager.getInstance().getSessionStatData(); diff --git a/fine-druid/src/com/fr/third/alibaba/druid/support/monitor/dao/MonitorDaoJdbcImpl.java b/fine-druid/src/com/fr/third/alibaba/druid/support/monitor/dao/MonitorDaoJdbcImpl.java index a4cd24f89..cf3597371 100644 --- a/fine-druid/src/com/fr/third/alibaba/druid/support/monitor/dao/MonitorDaoJdbcImpl.java +++ b/fine-druid/src/com/fr/third/alibaba/druid/support/monitor/dao/MonitorDaoJdbcImpl.java @@ -15,24 +15,6 @@ */ package com.fr.third.alibaba.druid.support.monitor.dao; -import java.lang.reflect.Field; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Timestamp; -import java.sql.Types; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - -import javax.sql.DataSource; - import com.fr.third.alibaba.druid.DruidRuntimeException; import com.fr.third.alibaba.druid.pool.DruidDataSourceStatValue; import com.fr.third.alibaba.druid.stat.JdbcSqlStatValue; @@ -47,7 +29,6 @@ import com.fr.third.alibaba.druid.support.monitor.annotation.MTable; import com.fr.third.alibaba.druid.support.monitor.entity.MonitorApp; import com.fr.third.alibaba.druid.support.monitor.entity.MonitorCluster; import com.fr.third.alibaba.druid.support.monitor.entity.MonitorInstance; -import com.fr.third.alibaba.druid.support.spring.stat.SpringMethodStatValue; import com.fr.third.alibaba.druid.util.JdbcUtils; import com.fr.third.alibaba.druid.util.StringUtils; import com.fr.third.alibaba.druid.util.Utils; @@ -56,6 +37,23 @@ import com.fr.third.alibaba.druid.wall.WallProviderStatValue; import com.fr.third.alibaba.druid.wall.WallSqlStatValue; import com.fr.third.alibaba.druid.wall.WallTableStatValue; +import javax.sql.DataSource; +import java.lang.reflect.Field; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.sql.Types; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + public class MonitorDaoJdbcImpl implements MonitorDao { private final static Log LOG = LogFactory.getLog(MonitorDaoJdbcImpl.class); @@ -66,8 +64,6 @@ public class MonitorDaoJdbcImpl implements MonitorDao { DruidDataSourceStatValue.class); private BeanInfo sqlStatBeanInfo = new BeanInfo( JdbcSqlStatValue.class); - private BeanInfo springMethodStatBeanInfo = new BeanInfo( - SpringMethodStatValue.class); private BeanInfo webURIStatBeanInfo = new BeanInfo( WebURIStatValue.class); private BeanInfo webAppStatBeanInfo = new BeanInfo( @@ -127,12 +123,7 @@ public class MonitorDaoJdbcImpl implements MonitorDao { save(sqlStatBeanInfo, ctx, sqlList); } } - - @Override - public void saveSpringMethod(MonitorContext ctx, List list) { - save(springMethodStatBeanInfo, ctx, list); - } - + @Override public void saveWebURI(MonitorContext ctx, List list) { save(webURIStatBeanInfo, ctx, list);