com.nepxion.discovery.plugin.test.automation.aop.TestAutoScanProxy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discovery-plugin-test-starter-automation Show documentation
Show all versions of discovery-plugin-test-starter-automation Show documentation
Nepxion Discovery is a solution for Spring Cloud with blue green, gray, weight, limitation, circuit breaker, degrade, isolation, monitor, tracing, dye, failover, async agent
The newest version!
package com.nepxion.discovery.plugin.test.automation.aop;
/**
* Title: Nepxion Discovery
* Description: Nepxion Discovery
* Copyright: Copyright (c) 2017-2050
* Company: Nepxion
* @author Haojun Ren
* @version 1.0
*/
import java.lang.annotation.Annotation;
import com.nepxion.discovery.plugin.test.automation.annotation.DTest;
import com.nepxion.discovery.plugin.test.automation.annotation.DTestConfig;
import com.nepxion.matrix.proxy.aop.DefaultAutoScanProxy;
import com.nepxion.matrix.proxy.mode.ProxyMode;
import com.nepxion.matrix.proxy.mode.ScanMode;
public class TestAutoScanProxy extends DefaultAutoScanProxy {
private static final long serialVersionUID = -4129026721568940949L;
private String[] commonInterceptorNames;
@SuppressWarnings("rawtypes")
private Class[] methodAnnotations;
public TestAutoScanProxy(String scanPackages) {
super(scanPackages, ProxyMode.BY_METHOD_ANNOTATION_ONLY, ScanMode.FOR_METHOD_ANNOTATION_ONLY);
}
@Override
protected String[] getCommonInterceptorNames() {
if (commonInterceptorNames == null) {
commonInterceptorNames = new String[] { "testInterceptor" };
}
return commonInterceptorNames;
}
@SuppressWarnings("unchecked")
@Override
protected Class extends Annotation>[] getMethodAnnotations() {
if (methodAnnotations == null) {
methodAnnotations = new Class[] { DTest.class, DTestConfig.class };
}
return methodAnnotations;
}
}