![](/img/trans.png)
[英]how to set non-standard HttpStatus in Spring reactive's ServerHttpResponse?
[英]In Spring Batch 3.0.x - How to set database type for Non-standard Database?
使用以前的xml格式,可以通過以下方式實現:-(1)
<value>classpath:batch-mysql.properties</value>
(2)
<bean id="jobRepository" class="org...JobRepositoryFactoryBean">
<property name="databaseType" value="mysql"/>
<property name="dataSource" ref="dataSource"/>
[參考: http : //docs.spring.io/spring-batch/reference/html/configureJob.html]
我能夠使用Spring Batch以前的格式xml處理數據庫。 但是我堅持使用新的格式注釋。 默認情況下,始終使用嵌入式hsql。
但是使用新格式(僅使用注釋)如何設置數據庫類型?
API文檔中關於此的信息不多。
有人可以幫我嗎? 謝謝。
在嘗試了幾件事之后。 想出一種方法來設置數據庫類型(可能不是有效的方法)。 我在用 -
HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter();
jpaVendorAdapter.setDatabase(Database.MYSQL);
這是工作。 我的代碼在這里-http://github.com/sidnan/spring-batch-example 。 如果有人有更好的東西,請告訴我。 謝謝!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.