mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Log warning when initSql or seedSql is not found as a resource
This commit is contained in:
@@ -257,7 +257,9 @@ public class DdlGenerator {
|
||||
protected void runResourceScript(Connection connection, String sqlScript) throws IOException {
|
||||
if (sqlScript != null) {
|
||||
try (InputStream is = getClassLoader().getResourceAsStream(sqlScript)) {
|
||||
if (is != null) {
|
||||
if (is == null) {
|
||||
log.warn("sql script {} was not found as a resource", sqlScript);
|
||||
} else {
|
||||
String content = readContent(new InputStreamReader(is));
|
||||
runScript(connection, false, content, sqlScript);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user