-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
314 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
springBootVersion=1.5.4.RELEASE | ||
grailsVersion=N/A - Spring Boot Version: 1.5.4.RELEASE | ||
gormVersion=6.1.5 | ||
gradleWrapperVersion=3.5.1 | ||
grailsVersion=N/A - Spring Boot Version: 1.5.4.RELEASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#Enable h2 console access via browser | ||
spring.h2.console.enabled=true | ||
spring.h2.console.path=/console | ||
spring.datasource.platform=h2 | ||
#spring.jpa.properties.hibernate.hbm2ddl=auto | ||
#spring.jpa.hibernate.ddl-auto=create-drop | ||
|
||
# Turn on hibernate bootstrap data | ||
spring.jpa.properties.hibernate.hbm2ddl.auto=create-drop |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
Now that our domain is in place, lets preload some data to work with. | ||
Now that all our app config is complete and we should be able to view our tables at | ||
http://localhost:8080/console lets go ahead and bootstrap some data. Since we don't have a | ||
built in bootstraping construct like we do in Grails we make use of a hibernate feature that | ||
allows us to auto import a sql file. | ||
|
||
[source,groovy] | ||
./grails-app/init/vaadin/Bootstrap.groovy | ||
First lets create a new file `import.sql` in `src/main/resources`. Once you have created | ||
the sql file go ahead and edit it and add the following. | ||
|
||
[source,sql] | ||
./src/main/resources/import.sql | ||
---- | ||
include::{sourceDir}/src/main/resources/import.sql[] | ||
---- | ||
include::{sourceDir}/grails-app/init/vaadin/Bootstrap.groovy[] | ||
---- | ||
|
||
Now as mentioned in the last section make sure that in | ||
your `application.properties` file you have `spring.jpa.properties.hibernate.hbm2ddl.auto=create-drop`. | ||
Without that line hibernate will not pickup on your `import.sql` and will not bootstrap | ||
your data. |
Oops, something went wrong.