diff --git a/spring-remoting-modules-3/remoting-jms-artemis/.idea/uiDesigner.xml b/spring-remoting-modules-3/remoting-jms-artemis/.idea/uiDesigner.xml new file mode 100644 index 0000000000..2b63946d5b --- /dev/null +++ b/spring-remoting-modules-3/remoting-jms-artemis/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-client/src/main/java/com/ossez/artemis/client/JmsArtemisClientApplication.java b/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-client/src/main/java/com/ossez/artemis/client/JmsArtemisClientApplication.java index 048dc9e351..7e6013b88e 100644 --- a/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-client/src/main/java/com/ossez/artemis/client/JmsArtemisClientApplication.java +++ b/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-client/src/main/java/com/ossez/artemis/client/JmsArtemisClientApplication.java @@ -4,6 +4,13 @@ package com.ossez.artemis.client; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +/** + * JMS Message Producer Application + * + * @author YuCheng Hu + */ + + @SpringBootApplication public class JmsArtemisClientApplication { diff --git a/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-client/src/main/java/com/ossez/artemis/client/controller/MQController.java b/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-client/src/main/java/com/ossez/artemis/client/controller/MQController.java index e8d9f1877d..4a490ed6c1 100644 --- a/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-client/src/main/java/com/ossez/artemis/client/controller/MQController.java +++ b/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-client/src/main/java/com/ossez/artemis/client/controller/MQController.java @@ -20,7 +20,7 @@ public class MQController { private final JmsProducer jmsProducer; @PostMapping("/send") - public String addContractorInfo(@RequestBody String request) { + public String sendToMQ(@RequestBody String request) { jmsProducer.send(request); return "Send"; diff --git a/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/main/java/com/ossez/artemis/server/JmsServer.java b/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/main/java/com/ossez/artemis/server/JmsArtemisServerApplication.java similarity index 55% rename from spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/main/java/com/ossez/artemis/server/JmsServer.java rename to spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/main/java/com/ossez/artemis/server/JmsArtemisServerApplication.java index 581ea2eeb1..9a8ba8a857 100644 --- a/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/main/java/com/ossez/artemis/server/JmsServer.java +++ b/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/main/java/com/ossez/artemis/server/JmsArtemisServerApplication.java @@ -3,18 +3,14 @@ package com.ossez.artemis.server; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.jms.annotation.JmsListener; -//import org.springframework.jmsremoting.JmsInvokerServiceExporter; +/** + * JMS Message Consumer Application + * + * @author YuCheng Hu + */ @SpringBootApplication -public class JmsServer { - - /* - This server needs to be connected to an ActiveMQ server. - To quickly spin up an ActiveMQ server, you can use Docker. - - docker run -p 61616:61616 -p 8161:8161 rmohr/activemq:5.14.3 - */ - +public class JmsArtemisServerApplication { @JmsListener(destination = "remotingQueue") @@ -23,7 +19,7 @@ public class JmsServer { } public static void main(String[] args) { - SpringApplication.run(JmsServer.class, args); + SpringApplication.run(JmsArtemisServerApplication.class, args); } } diff --git a/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/test/java/com/ossez/artemis/SpringContextLiveTest.java b/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/test/java/com/ossez/artemis/SpringContextLiveTest.java index 21553872ed..c87c582465 100644 --- a/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/test/java/com/ossez/artemis/SpringContextLiveTest.java +++ b/spring-remoting-modules-3/remoting-jms-artemis/remoting-jms-artemis-server/src/test/java/com/ossez/artemis/SpringContextLiveTest.java @@ -5,7 +5,7 @@ import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; -import com.ossez.artemis.server.JmsServer; +import com.ossez.artemis.server.JmsArtemisServerApplication; /** * This Live Test requires: @@ -13,7 +13,7 @@ import com.ossez.artemis.server.JmsServer; * * an ActiveMQ instance running (e.g. `docker run -p 61616:61616 -p 8161:8161 --name bael-activemq rmohr/activemq`) * */ -@SpringBootTest(classes = JmsServer.class) +@SpringBootTest(classes = JmsArtemisServerApplication.class) @RunWith(SpringRunner.class) public class SpringContextLiveTest {