Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The method of creating tables automatically by spring batch

Shulou Source: shulou.com Published: 2022-06-02 07:29:27 10月04日 Update

This article mainly introduces "the method of creating tables automatically by spring batch". In the daily operation, I believe that many people have doubts about the method of creating tables automatically by spring batch. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "the method of creating tables automatically by spring batch". Next, please follow the editor to study!

# spring.batch.initializer.enabled=truespring.batch.initialize-schema=ALWAYS

Look at .m2 / repositoryswap orgUniverse springframeworkUniverse springframework.RELEASEBootMutual autofinancing repositor2.1.6.RELEASE.jarAccording METAMAL INTAMAL

{"name": "spring.batch.initializer.enabled", "type": "java.lang.Boolean", "description": "Create the required batch tables on startup if necessary. Enabled automatically\ n if no custom table prefix is set or if a custom schema is configured., "deprecated": true, "deprecation": {"level": "error", "replacement": "spring.batch.initialize-schema"}}

Look at https://segmentfault.com/a/1190000016278038.

Spring.batch.initialize-schema=always means to have spring batch create a default data table in the database.

See each sql:

Orgswap springframeworkqqqql.sql

Spring.batch.schema=classpath:

Cannot be separated by commas, nor can spaces be treated as a file name and cannot be found.

Spring.batch.table-prefix=motor_Caused by: java.sql.SQLSyntaxErrorException: Table 'motor.motor_job_instance' doesn't exist is useless. The table is built at the beginning of batch. Delete the table of batch before the table of motor will be created. But not if you add people. At this point, the study on the method of creating tables automatically by spring batch is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Methods learning data more help no practical next no will create beginning database datasheet file file name article theory knowledge spaces article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Apple Shulou Information macOS NVidia