Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否可以使用spring嵌入式数据库动态添加脚本?_Spring_H2_Embedded Database - Fatal编程技术网

是否可以使用spring嵌入式数据库动态添加脚本?

是否可以使用spring嵌入式数据库动态添加脚本?,spring,h2,embedded-database,Spring,H2,Embedded Database,是否可以将脚本动态添加到Spring的EmbeddedDatabase?例如,每个参数有3个脚本,所以我想添加这3个脚本。下次我只想添加2个脚本。 它只会在开发模式中使用,但开发人员可以自己决定要使用哪些脚本,因为他们希望测试不同的数据 我希望你能理解我的问题:) 你好 可能类似于: private DatabasePopulator databasePopulator() { final ResourceDatabasePopulator populator = new Resourc

是否可以将脚本动态添加到Spring的EmbeddedDatabase?例如,每个参数有3个脚本,所以我想添加这3个脚本。下次我只想添加2个脚本。 它只会在开发模式中使用,但开发人员可以自己决定要使用哪些脚本,因为他们希望测试不同的数据

我希望你能理解我的问题:)

你好

可能类似于:

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

更多信息

你应该再解释一下。不确定你想要实现什么。您可以发布一些理想配置的伪代码或伪XML示例吗?