Upgrade to Reactor 3.0 and start building against SI 5.0 snapshots

Closes gh-7301
See gh-7029
This commit is contained in:
Andy Wilkinson
2016-11-03 20:49:02 +00:00
parent f7618cb421
commit 4486d2d209
19 changed files with 50 additions and 355 deletions

View File

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

View 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()
}
}

View File

@@ -1,4 +0,0 @@
@Configuration
@EnableReactor
class ReactorApplication {
}