当有几种不同类型的消息要发送时,推荐的定义KafkaTemplate的方法是什么?只对所有消息使用一个KafkaTemplate (带Object),还是为每种类型的消息定义每个KafkaTemplate?一个带有KafkaTemplate的模板Object@Bean returnreturn new KafkaTemplate<>
如果存在两个类型信息不同的实例,则通过键入将泛型接口的类型化组件注入泛型类将失败。,是否有足够的类型信息可用?我得到的结果是
org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of typeavailable: expected single matching bean but found 2: integerPrinter,str