mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
ConfigFilter support classpath
This commit is contained in:
@@ -236,6 +236,9 @@ public class ConfigFilter extends FilterAdapter {
|
||||
inStream = url.openStream();
|
||||
|
||||
xml = url.getPath().endsWith(".xml");
|
||||
} else if (filePath.startsWith("classpath:")) {
|
||||
String resourcePath = filePath.substring("classpath:".length());
|
||||
inStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath);
|
||||
} else {
|
||||
File file = new File(filePath);
|
||||
if (file.exists()) {
|
||||
|
||||
Reference in New Issue
Block a user