Log warning when initSql or seedSql is not found as a resource

This commit is contained in:
rob bygrave
2019-10-08 09:15:20 +13:00
parent 1098b572fe
commit 0e7607bb27
@@ -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);
}