
org.smallframework.spring.path.LocalClassPathScanningServiceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sorm Show documentation
Show all versions of sorm Show documentation
java jpa tool for spring
The newest version!
package org.smallframework.spring.path;
import java.io.IOException;
import java.net.URL;
import java.util.Set;
/**
* 本地实现(该实现主要拷贝和修改早期spring-core 5.0中的代码)
*/
public class LocalClassPathScanningServiceImpl implements ClassPathScanningService {
@Override
public Set getClassResourcesURL(URL rootClasspath, String... scanPackageArr) {
return LocalClassPathScanning.getClassResources(resource -> {
try {
return resource.getURL();
} catch (IOException e) {
throw new RuntimeException(e);
}
}, rootClasspath, scanPackageArr);
}
@Override
public Set getResourcesURL(URL rootClasspath, String... locationPatterns) {
return LocalClassPathScanning.getResources(resource -> {
try {
return resource.getURL();
} catch (IOException e) {
throw new RuntimeException(e);
}
}, rootClasspath, locationPatterns);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy