From 591f016e900aa40d61578be41ceb5e601ee350c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Wed, 9 Sep 2015 15:45:03 -0500 Subject: [PATCH 1/2] Expose actuator endpoints for flyway and liquibase Update the samples to expose the relevant actuator endpoint. Closes gh-3935 --- spring-boot-samples/spring-boot-sample-flyway/README.adoc | 6 ++++++ spring-boot-samples/spring-boot-sample-flyway/pom.xml | 8 ++++++++ .../spring-boot-sample-liquibase/README.adoc | 6 ++++++ spring-boot-samples/spring-boot-sample-liquibase/pom.xml | 8 ++++++++ 4 files changed, 28 insertions(+) create mode 100644 spring-boot-samples/spring-boot-sample-flyway/README.adoc create mode 100644 spring-boot-samples/spring-boot-sample-liquibase/README.adoc diff --git a/spring-boot-samples/spring-boot-sample-flyway/README.adoc b/spring-boot-samples/spring-boot-sample-flyway/README.adoc new file mode 100644 index 0000000000..dc419218f6 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-flyway/README.adoc @@ -0,0 +1,6 @@ +== Spring Boot Flyway Sample + +This sample demonstrates the flyway auto-configuration support. + +You can look at the `/flyway` endpoint to review the list of scripts executed. +E.g: http//localhost:8080/flyway diff --git a/spring-boot-samples/spring-boot-sample-flyway/pom.xml b/spring-boot-samples/spring-boot-sample-flyway/pom.xml index 97405d81cb..3533b7184a 100644 --- a/spring-boot-samples/spring-boot-sample-flyway/pom.xml +++ b/spring-boot-samples/spring-boot-sample-flyway/pom.xml @@ -19,10 +19,18 @@ ${basedir}/../.. + + org.springframework.boot + spring-boot-actuator + org.springframework.boot spring-boot-starter-data-jpa + + org.springframework.boot + spring-boot-starter-web + org.flywaydb flyway-core diff --git a/spring-boot-samples/spring-boot-sample-liquibase/README.adoc b/spring-boot-samples/spring-boot-sample-liquibase/README.adoc new file mode 100644 index 0000000000..736108ebd5 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-liquibase/README.adoc @@ -0,0 +1,6 @@ +== Spring Boot Liquibase Sample + +This sample demonstrates the liquibase auto-configuration support. + +You can look at the `/liquibase` endpoint to review the list of scripts executed. +E.g: http//localhost:8080/liquibase diff --git a/spring-boot-samples/spring-boot-sample-liquibase/pom.xml b/spring-boot-samples/spring-boot-sample-liquibase/pom.xml index aed22cfab3..2dbde3a327 100644 --- a/spring-boot-samples/spring-boot-sample-liquibase/pom.xml +++ b/spring-boot-samples/spring-boot-sample-liquibase/pom.xml @@ -19,10 +19,18 @@ ${basedir}/../.. + + org.springframework.boot + spring-boot-actuator + org.springframework.boot spring-boot-starter-jdbc + + org.springframework.boot + spring-boot-starter-web + org.liquibase liquibase-core From 0d2797ddd5f5d405197aa40c2d4de8602722d5cc Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Sep 2015 16:22:03 +0200 Subject: [PATCH 2/2] Polish contribution Closes gh-3936 --- .../spring-boot-sample-flyway/README.adoc | 7 +++++-- .../spring-boot-sample-flyway/pom.xml | 12 +++++++----- .../src/main/resources/application.properties | 4 +++- .../spring-boot-sample-liquibase/README.adoc | 7 +++++-- .../spring-boot-sample-liquibase/pom.xml | 12 +++++++----- .../src/main/resources/application.properties | 4 +++- 6 files changed, 30 insertions(+), 16 deletions(-) diff --git a/spring-boot-samples/spring-boot-sample-flyway/README.adoc b/spring-boot-samples/spring-boot-sample-flyway/README.adoc index dc419218f6..46d1e6c5f7 100644 --- a/spring-boot-samples/spring-boot-sample-flyway/README.adoc +++ b/spring-boot-samples/spring-boot-sample-flyway/README.adoc @@ -2,5 +2,8 @@ This sample demonstrates the flyway auto-configuration support. -You can look at the `/flyway` endpoint to review the list of scripts executed. -E.g: http//localhost:8080/flyway +You can look at `http//localhost:8080/flyway` to review the list of scripts. + +This sample also enables the H2 console (at `http//localhost:8080/h2-console`) +so that you can review the state of the database (the default jdbc url is +`jdbc:h2:mem:testdb`). diff --git a/spring-boot-samples/spring-boot-sample-flyway/pom.xml b/spring-boot-samples/spring-boot-sample-flyway/pom.xml index 3533b7184a..adf97c81e7 100644 --- a/spring-boot-samples/spring-boot-sample-flyway/pom.xml +++ b/spring-boot-samples/spring-boot-sample-flyway/pom.xml @@ -21,25 +21,27 @@ org.springframework.boot - spring-boot-actuator + spring-boot-starter-data-jpa org.springframework.boot - spring-boot-starter-data-jpa + spring-boot-starter-web org.springframework.boot - spring-boot-starter-web + spring-boot-actuator org.flywaydb flyway-core + - org.hsqldb - hsqldb + com.h2database + h2 runtime + org.springframework.boot spring-boot-starter-test diff --git a/spring-boot-samples/spring-boot-sample-flyway/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-flyway/src/main/resources/application.properties index 2cbca2b524..d18bea2e53 100644 --- a/spring-boot-samples/spring-boot-sample-flyway/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-flyway/src/main/resources/application.properties @@ -1 +1,3 @@ -spring.jpa.hibernate.ddl-auto: validate \ No newline at end of file +spring.jpa.hibernate.ddl-auto=validate + +spring.h2.console.enabled=true \ No newline at end of file diff --git a/spring-boot-samples/spring-boot-sample-liquibase/README.adoc b/spring-boot-samples/spring-boot-sample-liquibase/README.adoc index 736108ebd5..f3acd7274e 100644 --- a/spring-boot-samples/spring-boot-sample-liquibase/README.adoc +++ b/spring-boot-samples/spring-boot-sample-liquibase/README.adoc @@ -2,5 +2,8 @@ This sample demonstrates the liquibase auto-configuration support. -You can look at the `/liquibase` endpoint to review the list of scripts executed. -E.g: http//localhost:8080/liquibase +You can look at `http//localhost:8080/liquibase` to review the list of scripts. + +This sample also enables the H2 console (at `http//localhost:8080/h2-console`) +so that you can review the state of the database (the default jdbc url is +`jdbc:h2:mem:testdb`). diff --git a/spring-boot-samples/spring-boot-sample-liquibase/pom.xml b/spring-boot-samples/spring-boot-sample-liquibase/pom.xml index 2dbde3a327..2f50576775 100644 --- a/spring-boot-samples/spring-boot-sample-liquibase/pom.xml +++ b/spring-boot-samples/spring-boot-sample-liquibase/pom.xml @@ -21,25 +21,27 @@ org.springframework.boot - spring-boot-actuator + spring-boot-starter-jdbc org.springframework.boot - spring-boot-starter-jdbc + spring-boot-starter-web org.springframework.boot - spring-boot-starter-web + spring-boot-actuator org.liquibase liquibase-core + - org.hsqldb - hsqldb + com.h2database + h2 runtime + org.springframework.boot spring-boot-starter-test diff --git a/spring-boot-samples/spring-boot-sample-liquibase/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-liquibase/src/main/resources/application.properties index bb3f2d169b..288b7e85ad 100644 --- a/spring-boot-samples/spring-boot-sample-liquibase/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-liquibase/src/main/resources/application.properties @@ -1 +1,3 @@ -spring.jpa.hibernate.ddl-auto: none +spring.jpa.hibernate.ddl-auto=none + +spring.h2.console.enabled=true