title: Spring Integration with Kafka auto configuration issue
body: <p>I am trying to configure a Spring Boot application to consume Kafka messages. After adding:</p>
  
  <pre><code>&lt;!-- https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
      &lt;artifactId&gt;spring-kafka&lt;/artifactId&gt;
      &lt;version&gt;1.1.3.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>into my dependencies and with <code>@EnableKafka</code> and <code>@KafkaListener(topics = "some-topic")</code> annotations, I am getting the following error:</p>
  
  <pre><code>...
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'kafkaListenerContainerFactory' available
  </code></pre>
  
  <p>then I add the following configuration:</p>
  
  <pre><code>@Bean
  public Map&lt;String, Object&gt; consumerConfigs() {
  
      Map&lt;String, Object&gt; propsMap = new HashMap&lt;&gt;();
  
      propsMap.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
      propsMap.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false);
      propsMap.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, "100");
      propsMap.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, "15000");
      propsMap.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
      propsMap.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
      propsMap.put(ConsumerConfig.GROUP_ID_CONFIG, "group1");
      propsMap.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
      return propsMap;
  }
  
  @Bean
  public ConsumerFactory&lt;String, String&gt; consumerFactory() {
  
      return new DefaultKafkaConsumerFactory&lt;&gt;(consumerConfigs());
  }
  
  @Bean
  KafkaListenerContainerFactory&lt;ConcurrentMessageListenerContainer&lt;String, String&gt;&gt; kafkaListenerContainerFactory() {
  
      ConcurrentKafkaListenerContainerFactory&lt;String, String&gt; factory = new ConcurrentKafkaListenerContainerFactory&lt;&gt;();
      factory.setConsumerFactory(consumerFactory());
      factory.setConcurrency(3);
      factory.getContainerProperties().setPollTimeout(3000);
      return factory;
  }
  </code></pre>
  
  <p>The error is gone. However, I think I should be able to autoconfigure this with the <code>spring.kafka.listener.*</code> properties, as the documentation suggests.</p>
  
  <p>If I cannot, I would like to use an autowired <code>KafkaProperties</code>. However, to be able to use it, I am adding:</p>
  
  <pre><code>&lt;!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-autoconfigure&lt;/artifactId&gt;
      &lt;version&gt;1.5.2.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Then it is available to import. When I try to use it as following:</p>
  
  <pre><code>@Autowired
  private KafkaProperties kafkaProperties;
  </code></pre>
  
  <p>and in my method:</p>
  
  <pre><code> return kafkaProperties.buildConsumerProperties();
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code>Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.annotation.DeterminableImports
  .
  </code></pre>
  
  <p>which is a Maven dependency problem, I assume.</p>
  
  <p>So my questions are:</p>
  
  <ol>
  <li>Is it possible to configure a Kafka configuration without creating <code>@Bean</code>s but only with <code>application.properties</code>?</li>
  <li>If not, how can I skip manually creating the required <code>Map</code> object as above but simply use <code>kafkaProperties.buildConsumerProperties()</code> without getting the above error(2nd)?</li>
  </ol>