开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜