* @return List包含className
*/
@SuppressWarnings("all")
public static List<String> scanPackages(String basePackages) throws IllegalArgumentException{
Assert.notNull(basePackages,"'basePakcages' must be not null");
ResourcePatternResolver rl = new PathMatchingResourcePatternResolver();
MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(rl);
List result = new ArrayList();
String[] arrayPackages = basePackages.split(",");
try {
for(int j = 0; j < arrayPackages.length; j++) {
String packageToScan = arrayPackages[j];
String packagePart = packageToScan.replace('.', '/');
String classPattern = "classpath*:/" + packagePart + "/**/*.class";
Resource[] resources = rl.getResources(classPattern);
for (int i = 0; i < resources.length; i++) {
Resource resource = resources[i];
MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(resource);
String className = metadataReader.getClassMetadata().getClassName();
result.add(className);