【发布时间】:2018-04-26 15:51:06
【问题描述】:
我能以某种方式测试我的数据库(使用 HSQL)是否连接正确吗? 有没有可能模拟这种数据库,只是测试它,而不是完全连接到它?
application.properties
spring.datasource.driver-class-name=org.hsqldb.jdbcDriver
spring.datasource.url = jdbc:hsqldb:file:testdb.script
spring.datasource.username=sa
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
【问题讨论】:
-
用
jdbc:hsqldb:mem:test(全部在内存中)配置另一个HSQLDB并连接到这个而不是主数据库。
标签: java spring-boot hsqldb