Spring batch – changing default data-source

I had recently started learning Spring-Batch and followed the very first Getting started guide.
The default datasource used by Spring-batch is HSQL as an in-memory database, good enough for local development. But you may not only use that in production code. You can change that datasource to yours with the following configurations:

spring.datasource.url=<jdbc:url:for-your-database>
spring.datasource.username=<db-username>
spring.datasource.password=<db-password>

Enter fullscreen mode Exit fullscreen mode

All spring.datasource.* properties are bound to the fields of org.springframework.boot.autoconfigure.jdbc.DataSourceProperties class.

原文链接:Spring batch – changing default data-source

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容