public class DataSourceInitializer extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
DataSource that can run scripts on start up and shut
down. Us as a bean definition hsql.server project. Then you can right click in Eclipse and
Run As -> Java Application. Do the same any time you want to wipe the
database and start again.| Constructor and Description |
|---|
DataSourceInitializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
static void |
main(String... args)
Main method as convenient entry point.
|
void |
setDataSource(DataSource dataSource) |
void |
setDestroyScripts(org.springframework.core.io.Resource[] destroyScripts) |
void |
setIgnoreFailedDrop(boolean ignoreFailedDrop) |
void |
setInitScripts(org.springframework.core.io.Resource[] initScripts) |
public static void main(String... args)
args - public void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeanpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setInitScripts(org.springframework.core.io.Resource[] initScripts)
public void setDestroyScripts(org.springframework.core.io.Resource[] destroyScripts)
public void setDataSource(DataSource dataSource)
public void setIgnoreFailedDrop(boolean ignoreFailedDrop)
Copyright © 2014 Pivotal. All rights reserved.