You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
593 B
19 lines
593 B
package org.pqh.core.annotation;
|
|
|
|
import org.springframework.context.annotation.ImportSelector;
|
|
import org.springframework.core.type.AnnotationMetadata;
|
|
|
|
/**
|
|
* Created by reborn on 2017/9/20.
|
|
*/
|
|
public class ConfigurationSelector implements ImportSelector{
|
|
@Override
|
|
public String[] selectImports(AnnotationMetadata annotationMetadata) {
|
|
String path=this.getClass().getResource("").getPath();
|
|
if(path.contains("core")){
|
|
return new String[]{EnableWebCrawlerConfiguration.class.getName()};
|
|
}else{
|
|
return new String[0];
|
|
}
|
|
}
|
|
}
|
|
|