From 3f30b1d51e2e2f1c0a1f177195ca1439632161df Mon Sep 17 00:00:00 2001 From: Michael Schumacher Date: Thu, 10 Dec 2020 12:15:23 -0600 Subject: [PATCH] Update databaseConsole.adoc I found while trying to access DBConsole that with version 4.05 of Grails, it doesn't have that path any longer. The following link gives the detail of the process to fix, but I've updated/changed the document to reflect this (please change to make more sense if need be) --- src/main/docs/guide/databaseConsole.adoc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/docs/guide/databaseConsole.adoc b/src/main/docs/guide/databaseConsole.adoc index b9be7c6..e410916 100644 --- a/src/main/docs/guide/databaseConsole.adoc +++ b/src/main/docs/guide/databaseConsole.adoc @@ -1,6 +1,12 @@ -If you run the app again, you should see the same page as before. However, you can login to the DB Console and view your new database table. +Additional setup to view the H2 Database Console. Add the following to application.yml +spring: + h2: + console: + enabled: true -Browse to `http://localhost:8080/dbconsole` and login. The default username is `sa`, without a password. The default JDBC URL is: `jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE` +If you run the app again, you should see the same page as before. However, you can login to the H2 Console and view your new database table. + +Browse to `http://localhost:8080/h2-console` and login. The default username is `sa`, without a password. The default JDBC URL is: `jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE` image::dbconsole.png[DB Console] @@ -8,4 +14,4 @@ NOTE: You can view the JDBC url in `application.yml`, under `environments` `deve Once you've logged in to the DB Console, you should see your new `VEHICLES` table in the left-hand sidebar. Click the `+` icon to expand the table - you should see a list of columns, including the three `String` fields we just defined, `name`, `make,` and `model`. -image::dbconsole-2.png[DB Console] \ No newline at end of file +image::dbconsole-2.png[DB Console]