GlobalDbSetting优化默认配置读取规则,优先读取文件而非jar中的文件(issue#900@Github)

This commit is contained in:
Looly
2025-01-12 17:52:42 +08:00
parent 5f57da864d
commit b116be492a
3 changed files with 27 additions and 11 deletions

View File

@@ -79,6 +79,9 @@ public class FileResource implements Resource, Serializable {
@Override
public InputStream getStream() throws NoResourceException {
if (!this.file.exists()) {
throw new NoResourceException("File [{}] not exist!", this.file.getAbsolutePath());
}
return FileUtil.getInputStream(this.file);
}