KafkaClientUtil implements InitializingBean { public void send(String topic,Integer partition, String key,String value){ kafkaProducer.send(getProducerRecord(topic,partition,key,value)); }  @Override void afterPropertiesSet(); void send(String topic,Integer partition, String key,String value); void send(String value);  }
@Test public void testSend() throws Exception { kafkaClientUtil.send("{\"ip\":\"127.0.0.1\",\"paramers\":\"参数:\",\"time\":\"2016-05-24 17:44:35\",\"url\":\"/mobile/order/orderList/1/10\"} "); }