Upgrade to Spring-AMQP 2.2.0.M2
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.samples.spring</groupId>
|
||||
<artifactId>spring-rabbit-helloworld</artifactId>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Spring AMQP Hello World</name>
|
||||
<url>https://www.spring.io</url>
|
||||
@@ -17,7 +17,7 @@
|
||||
<properties>
|
||||
<maven.test.failure.ignore>true</maven.test.failure.ignore>
|
||||
<spring.framework.version>5.1.6.RELEASE</spring.framework.version>
|
||||
<spring.amqp.version>2.1.5.RELEASE</spring.amqp.version>
|
||||
<spring.amqp.version>2.2.0.M2</spring.amqp.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.test.failure.ignore>false</maven.test.failure.ignore>
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.samples.spring</groupId>
|
||||
<artifactId>spring-rabbit-helloworld</artifactId>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Spring AMQP Hello World</name>
|
||||
<url>https://www.spring.io</url>
|
||||
<description>
|
||||
<![CDATA[
|
||||
This project shows the usage of Spring AMQP integration classes.
|
||||
]]>
|
||||
</description>
|
||||
<properties>
|
||||
<maven.test.failure.ignore>true</maven.test.failure.ignore>
|
||||
<spring.framework.version>5.1.3.RELEASE</spring.framework.version>
|
||||
<spring.amqp.version>2.1.5.RELEASE</spring.amqp.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.test.failure.ignore>false</maven.test.failure.ignore>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-amqp</artifactId>
|
||||
<version>${spring.amqp.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-rabbit</artifactId>
|
||||
<version>${spring.amqp.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-messaging</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
<exclusions>
|
||||
<!-- Exclude Commons Logging in favor of SLF4j -->
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-messaging</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib-nodep</artifactId>
|
||||
<version>2.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.22</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>1.7.22</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.22</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.14</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.springsource.bundlor</groupId>
|
||||
<artifactId>com.springsource.bundlor.maven</artifactId>
|
||||
<version>1.0.0.M1B</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>project</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<configuration>
|
||||
<!--forkMode>pertest</forkMode-->
|
||||
<includes>
|
||||
<include>**/*Tests.java</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/Abstract*.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -21,7 +21,7 @@ public class HelloWorldConfiguration {
|
||||
connectionFactory.setPassword("guest");
|
||||
return connectionFactory;
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public AmqpAdmin amqpAdmin() {
|
||||
return new RabbitAdmin(connectionFactory());
|
||||
@@ -33,7 +33,7 @@ public class HelloWorldConfiguration {
|
||||
//The routing key is set to the name of the queue by the broker for the default exchange.
|
||||
template.setRoutingKey(this.helloWorldQueueName);
|
||||
//Where we will synchronously receive messages from
|
||||
template.setQueue(this.helloWorldQueueName);
|
||||
template.setDefaultReceiveQueue(this.helloWorldQueueName);
|
||||
return template;
|
||||
}
|
||||
|
||||
@@ -44,37 +44,37 @@ public class HelloWorldConfiguration {
|
||||
}
|
||||
|
||||
/*
|
||||
@Bean
|
||||
@Bean
|
||||
public Binding binding() {
|
||||
return declare(new Binding(helloWorldQueue(), defaultDirectExchange()));
|
||||
}*/
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
@Bean
|
||||
public TopicExchange helloExchange() {
|
||||
return declare(new TopicExchange("hello.world.exchange"));
|
||||
}*/
|
||||
|
||||
|
||||
/*
|
||||
public Queue declareUniqueQueue(String namePrefix) {
|
||||
Queue queue = new Queue(namePrefix + "-" + UUID.randomUUID());
|
||||
rabbitAdminTemplate().declareQueue(queue);
|
||||
return queue;
|
||||
}
|
||||
|
||||
|
||||
// if the default exchange isn't configured to your liking....
|
||||
@Bean Binding declareP2PBinding(Queue queue, DirectExchange exchange) {
|
||||
return declare(new Binding(queue, exchange, queue.getName()));
|
||||
}
|
||||
|
||||
|
||||
@Bean Binding declarePubSubBinding(String queuePrefix, FanoutExchange exchange) {
|
||||
return declare(new Binding(declareUniqueQueue(queuePrefix), exchange));
|
||||
}
|
||||
|
||||
|
||||
@Bean Binding declarePubSubBinding(UniqueQueue uniqueQueue, TopicExchange exchange) {
|
||||
return declare(new Binding(uniqueQueue, exchange));
|
||||
}
|
||||
|
||||
|
||||
@Bean Binding declarePubSubBinding(String queuePrefix, TopicExchange exchange, String routingKey) {
|
||||
return declare(new Binding(declareUniqueQueue(queuePrefix), exchange, routingKey));
|
||||
}*/
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>org.springframework.amqp.samples</groupId>
|
||||
<artifactId>log4j2</artifactId>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>log4j2</name>
|
||||
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.5.3.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<relativePath /> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-amqp-samples</artifactId>
|
||||
<name>Spring AMQP Samples</name>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>helloworld</module>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>org.springframework.amqp.samples</groupId>
|
||||
<artifactId>spring-rabbit-confirms-returns</artifactId>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>spring-rabbit-confirms-returns</name>
|
||||
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.6.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ import java.util.concurrent.TimeUnit;
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.core.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.amqp.rabbit.connection.CorrelationData;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.amqp.rabbit.support.CorrelationData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>spring-rabbit-global-errorhandler</artifactId>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>spring-rabbit-global-errorhandler</name>
|
||||
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.6.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>spring-rabbit-json</artifactId>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>spring-rabbit-json</name>
|
||||
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.6.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.samples.spring</groupId>
|
||||
<artifactId>spring-rabbit-stocks</artifactId>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<version>2.2.0.M2</version>
|
||||
<packaging>war</packaging>
|
||||
<name>Spring Rabbit Stocks</name>
|
||||
<url>https://www.spring.io</url>
|
||||
@@ -16,7 +16,7 @@
|
||||
<properties>
|
||||
<maven.test.failure.ignore>true</maven.test.failure.ignore>
|
||||
<spring.framework.version>5.1.6.RELEASE</spring.framework.version>
|
||||
<spring.amqp.version>2.1.5.RELEASE</spring.amqp.version>
|
||||
<spring.amqp.version>2.2.0.M2</spring.amqp.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.test.failure.ignore>false</maven.test.failure.ignore>
|
||||
|
||||
Reference in New Issue
Block a user