projects
/
demos
/
kafka
/
wordcount
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
query: 1.0.6 - Refined `QueryAppilcationConfiguration`
[demos/kafka/wordcount]
/
src
/
main
/
java
/
de
/
juplo
/
kafka
/
wordcount
/
query
/
QueryApplicationConfiguration.java
diff --git
a/src/main/java/de/juplo/kafka/wordcount/query/QueryApplicationConfiguration.java
b/src/main/java/de/juplo/kafka/wordcount/query/QueryApplicationConfiguration.java
index
9f6769f
..
3f866f0
100644
(file)
--- a/
src/main/java/de/juplo/kafka/wordcount/query/QueryApplicationConfiguration.java
+++ b/
src/main/java/de/juplo/kafka/wordcount/query/QueryApplicationConfiguration.java
@@
-18,11
+18,9
@@
import java.net.Socket;
public class QueryApplicationConfiguration
{
@Bean
public class QueryApplicationConfiguration
{
@Bean
- public
QueryStreamProcessor streamProcesso
r(
+ public
HostInfo applicationServe
r(
ServerProperties serverProperties,
ServerProperties serverProperties,
- QueryApplicationProperties applicationProperties,
- ObjectMapper mapper,
- ConfigurableApplicationContext context) throws IOException
+ QueryApplicationProperties applicationProperties) throws IOException
{
String host;
if (serverProperties.getAddress() == null)
{
String host;
if (serverProperties.getAddress() == null)
@@
-39,9
+37,19
@@
public class QueryApplicationConfiguration
Integer port = serverProperties.getPort() == null ? 8080 : serverProperties.getPort();
Integer port = serverProperties.getPort() == null ? 8080 : serverProperties.getPort();
+ return new HostInfo(host, port);
+ }
+
+ @Bean
+ public QueryStreamProcessor streamProcessor(
+ QueryApplicationProperties applicationProperties,
+ HostInfo applicationServer,
+ ObjectMapper mapper,
+ ConfigurableApplicationContext context)
+ {
return new QueryStreamProcessor(
applicationProperties.getApplicationId(),
return new QueryStreamProcessor(
applicationProperties.getApplicationId(),
-
new HostInfo(host, port)
,
+
applicationServer
,
applicationProperties.getBootstrapServer(),
applicationProperties.getUsersInputTopic(),
applicationProperties.getRankingInputTopic(),
applicationProperties.getBootstrapServer(),
applicationProperties.getUsersInputTopic(),
applicationProperties.getRankingInputTopic(),