e64a561eaa2f076b00d612e17d5ddf2ee8c63c7a
[JavaForFun] /
1 package de.example.spring.kafka;
2
3 import org.springframework.cloud.stream.messaging.Source;
4 import org.springframework.context.annotation.Bean;
5 import org.springframework.context.annotation.Configuration;
6
7 @Configuration
8 public class SenderConfig {
9
10   @Bean
11   public Sender sender(Source source) {
12     return new Sender(source);
13   }
14   
15 //  @Bean
16 //  public MessageConverter customMessageConverter(ObjectMapper objectMapper) {
17 //        MyCustomMessageConverter converter = new MyCustomMessageConverter();
18 //        converter.setSerializedPayloadClass(String.class);
19 //        if (objectMapper != null) {
20 //                converter.setObjectMapper(objectMapper);
21 //        }
22 //        
23 //        return converter;
24 //  }
25
26 //  @Bean
27 //  public MessageConverter avroMessageConverter() throws IOException {
28 //      AvroSchemaMessageConverter converter = new AvroSchemaMessageConverter(MimeType.valueOf("avro/bytes"));
29 //      //converter.setSchemaLocation(new ClassPathResource("schemas/User.avro"));
30 //      return converter;
31 //  }
32 }