Spring batch 试图创建现有的批处理表?
Spring batch trying to create existing batch tables?
我的应用程序正在使用 spring 批处理,在第一个 运行 批处理的表是在数据库中创建的,但在其他尝试 运行 它试图重新创建导致我出错的现有批处理表。
有什么方法可以防止 spring 批处理重新创建这些表吗?
Spring 批处理不创建任何 table,你应该在谈论 Spring 引导。有一种方法可以防止引导使用 spring.batch.initialize-schema=never, but there is no way to prevent re-creating them. Ideally, the scripts should include "if does not exist" clause (there is an open issue for that here: https://github.com/spring-projects/spring-batch/issues/1855) 创建 tables,但事实并非如此。
我的应用程序正在使用 spring 批处理,在第一个 运行 批处理的表是在数据库中创建的,但在其他尝试 运行 它试图重新创建导致我出错的现有批处理表。 有什么方法可以防止 spring 批处理重新创建这些表吗?
Spring 批处理不创建任何 table,你应该在谈论 Spring 引导。有一种方法可以防止引导使用 spring.batch.initialize-schema=never, but there is no way to prevent re-creating them. Ideally, the scripts should include "if does not exist" clause (there is an open issue for that here: https://github.com/spring-projects/spring-batch/issues/1855) 创建 tables,但事实并非如此。