Running a script to create tables with HSQLDB

前端 未结 4 1931
生来不讨喜
生来不讨喜 2021-02-04 17:24

I use hsqldb to run my unit tests that need a database access.

For the moment, when I want to create a table for a specific test, I have the following c

4条回答
  •  野性不改
    2021-02-04 17:53

    since you're already using spring, you might want to use the SimpleJdbcUtils.executeSQLScript method which executes an SQL script where the statements are separated with semicolon. this class is in the spring-test module (JAR).

提交回复
热议问题