Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of creating tables automatically by spring batch

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report