We use org.springframework.batch.test.DataSourceInitializer class in order to init DB on basis of .sql scripts.
Init was failed,after trigger had been added to .sql.
After debugging,the cause of error while was found here:
try {
scripts = StringUtils.delimitedListToStringArray(stripComments(IOUtils.readLines(scriptResource.getInputStream())), ";");
}
This error happened,because delimiter is ";" symbol,so trigger was splittet into several parts on basis of ";" and treated uncorrectly.
Can you advise me more advanced data source initializer,that will understand triggers correctly?
Thank you.