From 1947b924815b8fad78da6078d6a82a461d156cf2 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 16 May 2016 20:27:35 +0100 Subject: [PATCH] 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. --- spring-boot-samples/spring-boot-sample-data-rest/pom.xml | 4 ++-- .../src/test/resources/application-scratch.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-samples/spring-boot-sample-data-rest/pom.xml b/spring-boot-samples/spring-boot-sample-data-rest/pom.xml index 75e2cde066..fcb8440cea 100644 --- a/spring-boot-samples/spring-boot-sample-data-rest/pom.xml +++ b/spring-boot-samples/spring-boot-sample-data-rest/pom.xml @@ -28,8 +28,8 @@ spring-boot-starter-data-rest - org.hsqldb - hsqldb + com.h2database + h2 runtime diff --git a/spring-boot-samples/spring-boot-sample-data-rest/src/test/resources/application-scratch.properties b/spring-boot-samples/spring-boot-sample-data-rest/src/test/resources/application-scratch.properties index 1d31022540..3dfbdef810 100644 --- a/spring-boot-samples/spring-boot-sample-data-rest/src/test/resources/application-scratch.properties +++ b/spring-boot-samples/spring-boot-sample-data-rest/src/test/resources/application-scratch.properties @@ -1 +1 @@ -spring.datasource.url: jdbc:hsqldb:mem:restdb +spring.datasource.url: jdbc:h2:mem:restdb