groovy - Initial data for grails application -


I am developing a small grille application from a book and feeding the database with initial data. Using 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 "}}

When I run the script in the console, 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?

PS: I have seen this question, but it seems That's where I am now and what I want.

Thanks

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 ()}}   

is quite simple, isn 'T?

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -