Spring cloud streams could not autowire Source.class
问题 I am learning Spring Cloud Streams from scratch. I tried to create a Source application like this: import org.springframework.cloud.stream.messaging.Source; //etc @RestController @SpringBootApplication @CrossOrigin @EnableBinding(Source.class) public class StreamsProducerApplication { @Autowired Source source; @GetMapping(value="/send/{message}") public void sendMessage(@PathVariable String message){ if(message != null){ source.output().send(MessageBuilder.withPayload(message).build());} }