Quantcast
Viewing latest article 7
Browse Latest Browse All 30

Checking Your Demo Data

Now that we have the demo data how do we know that it is actually working and getting in to the database. It would be rather pointless trying to add the data to the UI if there is no data to add.

If you are using a persistent datasource then you can just use whatever databases tools you normally use to check the tables, but in our case we are using an in-memory database that disappears when the application is exited. Thankfully, however, the H2 in-memory database does have an admin console and SpringBoot sets it up for you when you have the spring-boot-devtools dependency added to your pom.xml file.

Image may be NSFW.
Clik here to view.

To access the H2 Console just start the application in your IDE and then access the console URL and click the connect button. You should not have to change any of the details in the rest of the dialog box.

Image may be NSFW.
Clik here to view.

Once connected you should see your two tables in the left navigator. If you click on the table name the SQL command to view the contents of the table should appear in the command box, just click on Run to load the table.

Image may be NSFW.
Clik here to view.

And if everything is correct you should see your demo data appear.

Image may be NSFW.
Clik here to view.

Now we can finally start adding the data to the UI…


Viewing latest article 7
Browse Latest Browse All 30

Trending Articles