BATCH-1939: Minor cleanups to AMQP sample
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<beans:beans
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:batch="http://www.springframework.org/schema/batch"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.1.xsd
|
||||
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
|
||||
|
||||
<!-- Default batch context. Uses HSQL as the datasource and initalizes it. -->
|
||||
|
||||
<context:property-placeholder location="classpath:default.properties" />
|
||||
|
||||
<jdbc:initialize-database data-source="dataSource">
|
||||
<jdbc:script location="${batch.schema.script}" />
|
||||
</jdbc:initialize-database>
|
||||
|
||||
<batch:job-repository id="jobRepository" />
|
||||
|
||||
<beans:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
|
||||
p:driverClassName="${batch.jdbc.driver}"
|
||||
p:url="${batch.jdbc.url}"
|
||||
p:username="${batch.jdbc.user}"
|
||||
p:password="${batch.jdbc.password}"/>
|
||||
|
||||
<beans:bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
|
||||
p:dataSource-ref="dataSource"/>
|
||||
|
||||
<beans:bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher"
|
||||
p:jobRepository-ref="jobRepository"/>
|
||||
</beans:beans>
|
||||
@@ -9,7 +9,6 @@
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||
|
||||
<beans:import resource="classpath:/META-INF/spring/config-beans.xml"/>
|
||||
<!-- <beans:import resource="classpath:/META-INF/spring/batch-beans.xml"/> -->
|
||||
<beans:import resource="classpath:/META-INF/spring/jobs/messaging/rabbitmq-beans.xml"/>
|
||||
<beans:import resource="classpath:/META-INF/spring/jobs/amqp/amqp-example-job-beans.xml"/>
|
||||
|
||||
|
||||
@@ -11,9 +11,12 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
/**
|
||||
* Run the job to read from the "test.inbound" queue, process the messages and write them to the "test.outbound" queue:
|
||||
* mvn -q exec:java -Dexec.mainClass="org.springframework.batch.core.launch.support.CommandLineJobRunner" \
|
||||
* -Dexec.arguments="classpath*:/META-INF/spring/jobs/amqp/amqp-example-job.xml,amqp-example-job"
|
||||
* <p>Ensure a RabbitMQ instance is running, modifying default.amqp.properties if needed. Execute the
|
||||
* {@link org.springframework.batch.sample.rabbitmq.amqp.AmqpMessageProducer#main(String[])} method
|
||||
* in order for messages will be written to the "test.inbound" queue.</p>
|
||||
*
|
||||
* <p>Run this test and the job will read those messages, process them and write them to the "test.outbound"
|
||||
* queue for inspection.</p>
|
||||
*/
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
|
||||
Reference in New Issue
Block a user