groovy - Initial data for grails application -
I am developing a small grille application from a book and feeding the database with initial data. Using When I run the script in the console, PS: I have seen this question, but it seems That's where I am now and what I want. Thanks is quite simple, isn 'T? GroovyConsole , executes the script but does not release the data.
DataSource.groovy Environmental settings are as follows: 'Predefined', '' URL = '' JDBC: H2: DIDB; MVCC = 1's' Make ',' Make-Drop ',' Update ',' TRUE; LOCK_TIMEOUT = 10000; DB_CLOSE_ON_EXIT = FALSE "}}
results returns
NULL . I use GGTS for application But I do not know how to continue the initial data from GGTS, so I have run the
grails console command from the command prompt for it. Is this the right way? Is it a straightforward way to do GGTS The way?
Create a SQL file with you need
BootStrap.groovy :
class bootstrap {df datasource DRIT init = {servletContext -> gt; ; SQL SQL = New SQL (Datasource) new file (PathOOSQL) .chline {sql.executeIdert}} sql.commit () sql.close ()}}
Comments
Post a Comment