f635538c2ed19d4bf7c258f04f2e953b4a960256
[JavaForFun] /
1 package de.example.spring.kafka;
2
3 import org.springframework.context.annotation.Bean;
4 import org.springframework.context.annotation.Configuration;
5
6 @Configuration
7 public class ReceiverConfig {
8
9   @Bean
10   public Receiver receiver(DummyService dummyService) {
11     return new Receiver(dummyService);
12   }
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
27 //  @Bean
28 //  public MessageConverter avroMessageConverter() throws IOException {
29 //      AvroSchemaMessageConverter converter = new AvroSchemaMessageConverter(MimeType.valueOf("avro/bytes"));
30 //      //converter.setSchemaLocation(new ClassPathResource("schemas/User.avro"));
31 //      return converter;
32 //  }
33 }