parent
299451516f
commit
d1394a0962
@ -0,0 +1,19 @@ |
||||
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]; |
||||
} |
||||
} |
||||
} |
@ -1,9 +1,8 @@ |
||||
package org.pqh.config; |
||||
|
||||
import org.pqh.core.annotation.EnableWebCrawlerConfiguration; |
||||
import org.springframework.context.annotation.Configuration; |
||||
|
||||
@Configuration |
||||
|
||||
@EnableWebCrawlerConfiguration |
||||
public class WebCrawlerConfig { |
||||
} |
||||
|
Loading…
Reference in new issue