是否可以使用spring嵌入式数据库动态添加脚本?
是否可以将脚本动态添加到Spring的EmbeddedDatabase?例如,每个参数有3个脚本,所以我想添加这3个脚本。下次我只想添加2个脚本。 它只会在开发模式中使用,但开发人员可以自己决定要使用哪些脚本,因为他们希望测试不同的数据 我希望你能理解我的问题:) 你好 可能类似于:是否可以使用spring嵌入式数据库动态添加脚本?,spring,h2,embedded-database,Spring,H2,Embedded Database,是否可以将脚本动态添加到Spring的EmbeddedDatabase?例如,每个参数有3个脚本,所以我想添加这3个脚本。下次我只想添加2个脚本。 它只会在开发模式中使用,但开发人员可以自己决定要使用哪些脚本,因为他们希望测试不同的数据 我希望你能理解我的问题:) 你好 可能类似于: private DatabasePopulator databasePopulator() { final ResourceDatabasePopulator populator = new Resourc
private DatabasePopulator databasePopulator() {
final ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
populator.addScript(schemaScript);
populator.addScript(dataScript);
return populator;
更多信息你应该再解释一下。不确定你想要实现什么。您可以发布一些理想配置的伪代码或伪XML示例吗?