Java 11 migrate remaining e (#1112)
* Moves eip-aggregator to Java 11 * Moves eip-message-channel to Java 11 * Moves eip-publish-subscribe to Java 11 * Moves eip-splitter to Java 11 * Moves eip-wire-tap to Java 11 * Moves event-aggregator to Java 11 * Moves event-asynchronous to Java 11 * Moves event-driven-architecture to Java 11 * Moves event-queue to Java 11 * Moves event-sourcing to Java 11 * Moves execute-around to Java 11 * Moves extension-objects to Java 11
This commit is contained in:
committed by
Ilkka Seppälä
parent
b09b100614
commit
fb2c026822
@ -23,8 +23,6 @@
|
||||
|
||||
package com.iluwatar.eip.publish.subscribe;
|
||||
|
||||
import org.apache.camel.CamelContext;
|
||||
import org.apache.camel.ProducerTemplate;
|
||||
import org.apache.camel.builder.RouteBuilder;
|
||||
import org.apache.camel.impl.DefaultCamelContext;
|
||||
import org.slf4j.Logger;
|
||||
@ -55,14 +53,14 @@ public class App {
|
||||
* Program entry point.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
CamelContext context = new DefaultCamelContext();
|
||||
var context = new DefaultCamelContext();
|
||||
context.addRoutes(new RouteBuilder() {
|
||||
@Override
|
||||
public void configure() throws Exception {
|
||||
from("direct:origin").multicast().to("mock:foo", "mock:bar", "stream:out");
|
||||
}
|
||||
});
|
||||
ProducerTemplate template = context.createProducerTemplate();
|
||||
var template = context.createProducerTemplate();
|
||||
context.start();
|
||||
context.getRoutes().forEach(r -> LOGGER.info(r.toString()));
|
||||
template.sendBody("direct:origin", "Hello from origin");
|
||||
|
@ -26,15 +26,12 @@ package com.iluwatar.eip.publish.subscribe;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* Application test
|
||||
*
|
||||
*/
|
||||
public class AppTest {
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
String[] args = {};
|
||||
App.main(args);
|
||||
App.main(new String[]{});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user