Class DataSourceInitializer

java.lang.Object
org.springframework.batch.test.DataSourceInitializer
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

@Deprecated(since="5.0", forRemoval=true) public class DataSourceInitializer extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Deprecated, for removal: This API element is subject to removal in a future version.
since 5.0 in favor of similar utilities provided by Spring Framework. Scheduled for removal in 5.2.
Wrapper for a DataSource that can run scripts on start up and shut down. Use as a bean definition
Run this class to initialize a database in a running server process. Make sure the server is running first by launching the "hsql-server" from the 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.
Author:
Dave Syer, Drummond Dawson, Mahmoud Ben Hassine
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static void
    main(String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Main method as convenient entry point.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setDestroyScripts(org.springframework.core.io.Resource[] destroyScripts)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setIgnoreFailedDrop(boolean ignoreFailedDrop)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setInitScripts(org.springframework.core.io.Resource[] initScripts)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataSourceInitializer

      public DataSourceInitializer()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • main

      public static void main(String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Main method as convenient entry point.
      Parameters:
      args - arguments to be passed to main.
    • destroy

      public void destroy()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • afterPropertiesSet

      public void afterPropertiesSet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • setInitScripts

      public void setInitScripts(org.springframework.core.io.Resource[] initScripts)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setDestroyScripts

      public void setDestroyScripts(org.springframework.core.io.Resource[] destroyScripts)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setDataSource

      public void setDataSource(DataSource dataSource)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setIgnoreFailedDrop

      public void setIgnoreFailedDrop(boolean ignoreFailedDrop)
      Deprecated, for removal: This API element is subject to removal in a future version.