Not running DDL scripts with spring batch + spring boot + sql server application

╄→гoц情女王★ 提交于 2019-12-09 04:04:27

The project you are linking to uses the in-memory hsqldb instance so Spring Boot will automatically create Spring Batch meta-data tables for you.

If you want to adapt the sample to your project and use sql server (which is not embedded in your JVM), Spring Boot will not create Spring Batch tables (unless you instruct it to do so). In this case, you have two options:

  • Run the Spring Batch DDL script for sqlserver yourself against the db server you are using before running your app

  • Or instruct Spring Boot to do it for you by specifying the following properties in your application.properties file:

    spring.batch.initialize-schema=always spring.batch.schema=classpath:org/springframework/batch/core/schema-sqlserver.sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!