Questions tagged «spring-batch»

27
无法配置数据源:未指定'url'属性,并且无法配置任何嵌入式数据源
我正在使用MongoDB处理Spring Boot Batch示例,并且我已经启动了mongod服务器。 启动应用程序时,出现以下错误。 关于这个问题有什么建议吗? *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or …

7
如何在Spring Batch中从ItemReader访问作业参数?
这是我的一部分job.xml: <job id="foo" job-repository="job-repository"> <step id="bar"> <tasklet transaction-manager="transaction-manager"> <chunk commit-interval="1" reader="foo-reader" writer="foo-writer" /> </tasklet> </step> </job> 这是商品阅读器: import org.springframework.batch.item.ItemReader; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component("foo-reader") public final class MyReader implements ItemReader<MyData> { @Override public MyData read() throws Exception { //... } @Value("#{jobParameters['fileName']}") public void setFileName(final String name) { //... } } …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.