0

is it possible, to add scripts to the EmbeddedDatabase of Spring dynamically? I get for example 3 scripts per parameter, so i want to add these 3. The next time I only want to add 2 scripts. It will only used in development mode, but developers can decided themselves, which scripts they want to use, cause they want to test different data as another.

I hope you understand my question :)

Greetings!

  • You should explain a bit more. Not sure about what you are trying to achieve. Can you maybe post some pseudo-code or pseudo-XML example of your *ideal configuration*? – Pavel Horal Oct 04 '13 at 18:41

1 Answers1

1

May be something like:

private DatabasePopulator databasePopulator() {
    final ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
    populator.addScript(schemaScript);
    populator.addScript(dataScript);
    return populator;

More information here

Community
  • 1
  • 1
borjab
  • 11,149
  • 6
  • 71
  • 98