<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:rabbit="http://www.springframework.org/schema/rabbit"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd
    http://www.springframework.org/schema/rabbit
    http://www.springframework.org/schema/rabbit/spring-rabbit-1.4.xsd">

	<!-- 定义RabbitMQ的连接工厂 -->
	<rabbit:connection-factory
		id="connectionFactory" host="${rabbit.ip}" port="${rabbit.port}"
		username="${rabbit.username}" password="${rabbit.password}" />

	<rabbit:admin connection-factory="connectionFactory" />
	<!-- 消息对象json转换类 -->
	<bean id="jsonMessageConverter"
		class="org.springframework.amqp.support.converter.Jackson2JsonMessageConverter" />
	<import resource="spring-mq-consumer.xml" />

</beans>