Kafka Sample Improvements
- get rid of topic creator and scala deps - use boot properties - demonstrate using the DSL to dynamically add adapters
This commit is contained in:
committed by
Artem Bilan
parent
65368f7959
commit
038ee4576a
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,6 +19,7 @@ package org.springframework.integration.samples.barrier;
|
||||
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
|
||||
import org.springframework.boot.Banner.Mode;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
@@ -43,7 +44,7 @@ public class Application {
|
||||
|
||||
ConfigurableApplicationContext client
|
||||
= new SpringApplicationBuilder("/META-INF/spring/integration/client-context.xml")
|
||||
.web(false)
|
||||
.web(WebApplicationType.NONE)
|
||||
.bannerMode(Mode.OFF)
|
||||
.run(args);
|
||||
RequestGateway requestGateway = client.getBean("requestGateway", RequestGateway.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,6 +18,7 @@ package org.springframework.integration.samples.barrier2;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
@@ -33,7 +34,7 @@ public class ErrorHandlingApplication {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
ConfigurableApplicationContext test = new SpringApplicationBuilder(ErrorHandlingApplication.class)
|
||||
.web(false)
|
||||
.web(WebApplicationType.NONE)
|
||||
.run(args);
|
||||
Gateway gateway = test.getBean(Gateway.class);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user