Results 1 to 2 of 2

Thread: How to configure Spring Batch Admin to use mysql?

  1. #1
    Join Date
    Aug 2012
    Posts
    17

    Default How to configure Spring Batch Admin to use mysql?

    Hi everybody.

    I'm trying to configure Spring Batch Admin to use my MySQL instance but it's not working. I'm trying to customize the sample application.

    According to the official documentation I need to create a file named batch-mysql.properties AND pass a system property like -DENVIRONMENT=[mysql] OR I have the option to write a spring configuration file under META-INF/spring/batch/override/app-context.xml like this:

    Code:
    <context:property-placeholder location="classpath:jdbc.properties"
    		ignore-unresolvable="true" />
    
    	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
    		destroy-method="close" p:driverClassName="${jdbc.driverClassName}"
    		p:url="${jdbc.url}" p:username="${jdbc.username}" p:password="${jdbc.password}" />
    I'm building the application using its pom (mvn clean install) and it's still using hsql db!

    What am I missing?

    Please help me!

    Thanks.

  2. #2
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    351

    Default

    Remove the mysql from the file name. It should be batch.properties.
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •