diff --git a/tsdb-express/src/main/java/com/dcits/tsdb/impl/InfluxDBInterfaceFilter.java b/tsdb-express/src/main/java/com/dcits/tsdb/impl/InfluxDBInterfaceFilter.java index 449b04a..fa53946 100644 --- a/tsdb-express/src/main/java/com/dcits/tsdb/impl/InfluxDBInterfaceFilter.java +++ b/tsdb-express/src/main/java/com/dcits/tsdb/impl/InfluxDBInterfaceFilter.java @@ -30,8 +30,9 @@ protected boolean match(ClassMetadata metadata) { boolean isMatch = false; String repoName = ClassUtils.getShortName(this.dbClass.getName()); - Class p = null; + /*Class p = null; try { + p = Class.forName(metadata.getClassName()); } catch (ClassNotFoundException e) { @@ -47,7 +48,22 @@ protected boolean match(ClassMetadata metadata) { break; } } + }*/ + + if(metadata.isInterface()){ + String[] interfaceNames = metadata.getInterfaceNames(); + if(interfaceNames != null && interfaceNames.length > 0){ + for(String interfaceName:interfaceNames){ + if(interfaceName.contains(repoName)){ + isMatch = true; + break; + } + } + } } + + + return isMatch; }