开发者

How can i connect to database in Spring batch [closed]

开发者 https://www.devze.com 2023-02-17 15:33 出处:网络
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post.
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 8 years ago.

开发者_Go百科 Improve this question

I am working on an application. I am using DB-repository.xml to configure my database. I am using MYSQL for it. I created a database named batchsample and created a table called employee which has 4 fields. My application is connecting to the database but it is not taking the table which i have created, in fact it is taking some other table called batch_job_instance. How can i connect my app to the created table employee. I have used the following in my DB-repository.xml:

<bean id="jobRepository-dataSource"
   class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver" />
    <property name="url" value="jdbc:mysql://localhost:3306/batchsample" />
    <property name="username" value="root" />
    <property name="password" value="root" />


You can't. But you can change the prefix.

From documentation :

Only the table prefix is configurable. The table and column names are not.

Source:

  • Spring Batch Reference Documentation > Changing the Table Prefix
0

精彩评论

暂无评论...
验证码 换一张
取 消