运行spring cloud任务批处理app时出错

问题描述 投票:0回答:1

运行spring cloud task batch app时出错

错误:Statement.execute(CREATE TABLE TASK_EXECUTION(...)失败! org.postgresql.util.PSQLException: exceptioin: "task_execution" 名称关系已经存在

有没有办法禁用表创建脚本?

enter image description here

最好区分是否使用该函数中本地设置中的值运行 ddl 脚本(创建表...)...

例如。在 spring batch app 中设置

  • spring.batch.jdbc.initialize-schema=never

enter image description here

enter image description here enter image description here

我可以编辑这个来源吗?

initialization exists relation spring-cloud-task
1个回答
0
投票

可以通过设置属性来禁止Spring Cloud Task的数据库初始化:

spring.cloud.task.initialize-enabled=false

它的工作原理类似于

spring.batch.jdbc.initialize-schema
.

您可以在参考文档中找到更多相关信息。

© www.soinside.com 2019 - 2024. All rights reserved.