Return to Snippet

Revision: 62302
at February 14, 2013 18:11 by alces


Initial Code
//hsqldb.properties must be in WEB_INF/classes dir for this style loading
getClass().classLoader.getResource('hsqldb.properties').withReader {
    System.properties.load it
}
arg = 'dsn user pass drv'.split().collect {
    System.properties."hsqldb.$it"
}
db = Sql.newInstance(*arg)

Initial URL
groovlet_hsqldb_properties

Initial Description
Example of using .properties file for get database connection parameters into script

Initial Title
Load HSQLDB connection parameters from .properties file in groovlet

Initial Tags

                                

Initial Language
Groovy