Upgrade to Reactor 3.0 and start building against SI 5.0 snapshots
Closes gh-7301 See gh-7029
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
@SpringBootTest(classes=ReactorApplication, webEnvironment=WebEnvironment.RANDOM_PORT)
|
||||
class RestTests {
|
||||
import org.springframework.jms.core.JmsTemplate
|
||||
|
||||
@SpringBootTest(classes=JmsExample)
|
||||
class JmsTests {
|
||||
|
||||
@Autowired
|
||||
EventBus eventBus
|
||||
JmsTemplate jmsTemplate
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
assertNotNull(eventBus)
|
||||
assertNotNull(jmsTemplate)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
31
spring-boot-cli/test-samples/jms.groovy
Normal file
31
spring-boot-cli/test-samples/jms.groovy
Normal file
@@ -0,0 +1,31 @@
|
||||
@Grab("spring-boot-starter-artemis")
|
||||
@Grab("artemis-jms-server")
|
||||
import java.util.concurrent.CountDownLatch
|
||||
|
||||
@Log
|
||||
@Configuration
|
||||
@EnableJms
|
||||
class JmsExample implements CommandLineRunner {
|
||||
|
||||
private CountDownLatch latch = new CountDownLatch(1)
|
||||
|
||||
@Autowired
|
||||
JmsTemplate jmsTemplate
|
||||
|
||||
void run(String... args) {
|
||||
def messageCreator = { session ->
|
||||
session.createObjectMessage("Greetings from Spring Boot via Artemis")
|
||||
} as MessageCreator
|
||||
log.info "Sending JMS message..."
|
||||
jmsTemplate.send("spring-boot", messageCreator)
|
||||
log.info "Send JMS message, waiting..."
|
||||
latch.await()
|
||||
}
|
||||
|
||||
@JmsListener(destination = 'spring-boot')
|
||||
def receive(String message) {
|
||||
log.info "Received ${message}"
|
||||
latch.countDown()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
@Configuration
|
||||
@EnableReactor
|
||||
class ReactorApplication {
|
||||
}
|
||||
Reference in New Issue
Block a user