Monday, November 26, 2012

Grails dbconsole

A feature I have never used in Grails is the h2 web browser. A great way to see what the db structure and what the data looks like. This allows you to easily see the db structure your domain classes boil down to.

If you are running an application at
localhost:8080/appname
 You can browse to
localhost:8080/appname/dbconsole
For the JDBC URL use the setting from your DataSource.groovy in my case
jdbc:h2:mem:devDb
 And there we go all domain objects visible. Not only can you run sql queries but you can insert, modify, delete.


No comments:

Post a Comment