spring_reference/IX. ‘How-to’ guides/68.4. Initialize a Spring B...

4 lines
566 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 68.4. 初始化Spring Batch数据库
如果你正在使用Spring Batch那么它会为大多数的流行数据库平台预装SQL初始化脚本。Spring Boot会检测你的数据库类型并默认执行那些脚本在这种情况下将关闭快速失败特性错误被记录但不会阻止应用启动。这是因为那些脚本是可信任的通常不会包含bugs所以错误会被忽略掉并且对错误的忽略可以让脚本具有幂等性。你可以使用`spring.batch.initializer.enabled=false`显式关闭初始化功能。