title: spring-cloud-stream sample projects raises NoSuchBeanDefinitionException of KafkaStreamsFunctionProcessor
body: <p>I'm trying to touch spring-cloud-stream, and creating a sample project of the <a href="https://spring.io/blog/2019/12/02/stream-processing-with-spring-cloud-stream-and-apache-kafka-streams-part-1-programming-model" rel="nofollow noreferrer">official blog</a>.</p>
  <p>Implementation is totally same as the article.</p>
  <pre class="lang-java prettyprint-override"><code>@SpringBootApplication
  public class SimpleConsumerApplication {
  
     @Bean
     public java.util.function.Consumer&lt;KStream&lt;String, String&gt;&gt; process() {
  
         return input -&gt;
                 input.foreach((key, value) -&gt; {
                     System.out.println(&quot;Key: &quot; + key + &quot; Value: &quot; + value);
                 });
     }
  }
  </code></pre>
  <p>I've selected <code>Cloud Stream</code> and <code>Spring for Apache Kafka Stream</code> on <a href="https://start.spring.io/" rel="nofollow noreferrer">Spring initializr</a>, and added <code>ShadowJar</code>. Now my <code>build.gradle</code> is like this.</p>
  <pre><code>plugins {
      id 'org.springframework.boot' version '2.4.4'
      id 'io.spring.dependency-management' version '1.0.11.RELEASE'
      id 'java'
      id 'com.github.johnrengelman.shadow' version '6.1.0'
  }
  
  group = 'com.lipsum'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = '11'
  
  jar {
      manifest {
          attributes('Main-Class': 'com.lipsum.kafkastream.KafkastreamApplication')
      }
  }
  
  shadowJar {
      archiveBaseName.set('kafka-stream-practice')
      archiveClassifier.set('')
      archiveVersion.set('')
  }
  
  repositories {
      mavenCentral()
  }
  
  ext {
      set('springCloudVersion', &quot;2020.0.2&quot;)
  }
  
  dependencies {
      implementation 'org.apache.kafka:kafka-streams'
      implementation 'org.springframework.cloud:spring-cloud-stream'
      implementation 'org.springframework.cloud:spring-cloud-stream-binder-kafka-streams'
      testImplementation 'org.springframework.boot:spring-boot-starter-test'
  }
  
  dependencyManagement {
      imports {
          mavenBom &quot;org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}&quot;
      }
  }
  
  test {
      useJUnitPlatform()
  }
  </code></pre>
  <p>I execute the uber jar, but springboot application fails to recognize the bean.</p>
  <pre><code>$ java -jar kafka-stream-practice.jar --spring.cloud.stream.bindings.process-in-0.destination=kafka-stream-practice
  ...
  22:47:21.162 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
  org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'kafkaStreamsFunctionProcessorInvoker' defined in class path resource [org/springframework/cloud/stream/binder/kafka/streams/function/KafkaStreamsFunctionAutoConfiguration.class]: Unsatisfied dependency expressed through method 'kafkaStreamsFunctionProcessorInvoker' parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsFunctionProcessor' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsFunctionProcessor' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
  </code></pre>
  <p>I don't think the implementation has any problems. Do I miss some dependencies?</p>