This commit is contained in:
YuCheng Hu 2023-09-13 09:23:20 -04:00
parent 29381a633e
commit 228c510918
No known key found for this signature in database
GPG Key ID: 942395299055675C
2 changed files with 9 additions and 13 deletions

View File

@ -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);
}
}

View File

@ -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 {