summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6c5e42d)
--
separated detection of correct `HostInfo` into a separate ``@Bean``-method
public class QueryApplicationConfiguration
{
@Bean
public class QueryApplicationConfiguration
{
@Bean
- public QueryStreamProcessor streamProcessor(
+ public HostInfo applicationServer(
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)
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),
applicationProperties.getBootstrapServer(),
applicationProperties.getUsersInputTopic(),
applicationProperties.getRankingInputTopic(),
applicationProperties.getBootstrapServer(),
applicationProperties.getUsersInputTopic(),
applicationProperties.getRankingInputTopic(),