Skip to content

Commit 1947b92

Browse files
committed
Avoid exception from dropping non-existent constraint in Data REST sample
Hibernate 5.1 logs an ugly but benign exception when using an in-memory HSQL database when it tries to drop a non-existent constraint. This commit changes the Spring Data REST sample to use H2 rather than HSQL. This prevents the unwanted exception from occurring as Hibernate's H2 dialect returns false from dropConstraints.
1 parent 00fbb5c commit 1947b92

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spring-boot-samples/spring-boot-sample-data-rest/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<artifactId>spring-boot-starter-data-rest</artifactId>
2929
</dependency>
3030
<dependency>
31-
<groupId>org.hsqldb</groupId>
32-
<artifactId>hsqldb</artifactId>
31+
<groupId>com.h2database</groupId>
32+
<artifactId>h2</artifactId>
3333
<scope>runtime</scope>
3434
</dependency>
3535
<dependency>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
spring.datasource.url: jdbc:hsqldb:mem:restdb
1+
spring.datasource.url: jdbc:h2:mem:restdb

0 commit comments

Comments
 (0)