Spring Batch Framework - Auto create Batch Table

后端 未结 9 1578
广开言路
广开言路 2020-12-01 12:02

I just created a batch job using Spring Batch framework, but I don\'t have Database privileges to run CREATE SQL. When I try to run the batch job I hit the error while the f

9条回答
  •  旧巷少年郎
    2020-12-01 12:39

    With Spring Boot 2.0 you probably need this: https://docs.spring.io/spring-boot/docs/2.0.0.M7/reference/htmlsingle/#howto-initialize-a-spring-batch-database

    spring.batch.initialize-schema=always
    

    By default it will only create the tables if you are using an embedded database.

    Or

     spring.batch.initialize-schema=never
    

    To permanently disable it.

提交回复
热议问题