提交 aa55121b 编写于 作者: A ascrutae

refactory code

上级 3f2e7904
......@@ -49,8 +49,6 @@ import static org.skywalking.apm.plugin.jdbc.define.Constants.SERVICE_METHOD_INT
*/
public abstract class ConnectionInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String ENHANCE_CLASS = "com.mysql.jdbc.ConnectionImpl";
@Override protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
return new ConstructorInterceptPoint[0];
}
......
......@@ -29,7 +29,11 @@ import static org.skywalking.apm.plugin.jdbc.mysql.define.MultiClassNameMatch.by
* @author zhangxin
*/
public class Mysql5xConnectionInstrumentation extends ConnectionInstrumentation {
public static final String ENHANCE_CLASS = "com.mysql.jdbc.ConnectionImpl";
public static final String CJ_JDBC_ENHANCE_CLASS = "com.mysql.cj.jdbc.ConnectionImpl";
@Override protected ClassMatch enhanceClass() {
return byMultiClassMatch(ENHANCE_CLASS, "com.mysql.cj.jdbc.ConnectionImpl");
return byMultiClassMatch(ENHANCE_CLASS, CJ_JDBC_ENHANCE_CLASS);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册