diff --git a/spring-boot-samples/spring-boot-sample-activemq/pom.xml b/spring-boot-samples/spring-boot-sample-activemq/pom.xml index 8ac54f36cf..ed234f5630 100644 --- a/spring-boot-samples/spring-boot-sample-activemq/pom.xml +++ b/spring-boot-samples/spring-boot-sample-activemq/pom.xml @@ -1,18 +1,23 @@ - + + 4.0.0 + spring-boot-samples org.springframework.boot 1.3.0.BUILD-SNAPSHOT - 4.0.0 spring-boot-sample-activemq Spring Boot ActiveMQ Sample Spring Boot ActiveMQ Sample http://projects.spring.io/spring-boot/ - + + Pivotal Software, Inc. + http://www.spring.io + + + ${basedir}/../.. + org.springframework.boot @@ -26,14 +31,12 @@ org.apache.activemq activemq-broker - org.springframework.boot spring-boot-starter-test test - @@ -42,5 +45,4 @@ - diff --git a/spring-boot-samples/spring-boot-sample-activemq/src/main/java/sample/activemq/Producer.java b/spring-boot-samples/spring-boot-sample-activemq/src/main/java/sample/activemq/Producer.java index 0f972b0af4..034060fd57 100644 --- a/spring-boot-samples/spring-boot-sample-activemq/src/main/java/sample/activemq/Producer.java +++ b/spring-boot-samples/spring-boot-sample-activemq/src/main/java/sample/activemq/Producer.java @@ -39,7 +39,7 @@ public class Producer implements CommandLineRunner { } public void send(String msg) { - jmsMessagingTemplate.convertAndSend(queue, msg); + this.jmsMessagingTemplate.convertAndSend(this.queue, msg); } } diff --git a/spring-boot-samples/spring-boot-sample-activemq/src/main/java/sample/activemq/SampleActiveMQApplication.java b/spring-boot-samples/spring-boot-sample-activemq/src/main/java/sample/activemq/SampleActiveMQApplication.java index 5ff035c4b5..ad2becb138 100644 --- a/spring-boot-samples/spring-boot-sample-activemq/src/main/java/sample/activemq/SampleActiveMQApplication.java +++ b/spring-boot-samples/spring-boot-sample-activemq/src/main/java/sample/activemq/SampleActiveMQApplication.java @@ -16,14 +16,14 @@ package sample.activemq; +import javax.jms.Queue; + import org.apache.activemq.command.ActiveMQQueue; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.jms.annotation.EnableJms; -import javax.jms.Queue; - @SpringBootApplication @EnableJms public class SampleActiveMQApplication { diff --git a/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java b/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java index f9c8d35e19..70c1102a9c 100644 --- a/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java +++ b/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java @@ -16,6 +16,8 @@ package sample.activemq; +import javax.jms.JMSException; + import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -24,12 +26,15 @@ import org.springframework.boot.test.OutputCapture; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import javax.jms.JMSException; - import static org.junit.Assert.assertTrue; +/** + * Integration tests for demo application. + * + * @author EddĂș MelĂ©ndez + */ @RunWith(SpringJUnit4ClassRunner.class) -@SpringApplicationConfiguration(classes = {SampleActiveMQApplication.class}) +@SpringApplicationConfiguration(classes = { SampleActiveMQApplication.class }) public class SampleActiveMqTests { @Rule @@ -40,9 +45,9 @@ public class SampleActiveMqTests { @Test public void sendSimpleMessage() throws InterruptedException, JMSException { - producer.send("Test message"); + this.producer.send("Test message"); Thread.sleep(1000L); - assertTrue(outputCapture.toString().contains("Test message")); + assertTrue(this.outputCapture.toString().contains("Test message")); } }