All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.server.springboot.database.cassandra.CassandraDatabaseConfiguration.mustache Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package {{ packageName }}.wire.cassandra.infrastructure.secondary;

import {{ packageName }}.wire.cassandra.infrastructure.secondary.CassandraJSR310DateConverters.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.cassandra.core.convert.CassandraCustomConversions;

import java.util.ArrayList;
import java.util.List;

@Configuration
class CassandraDatabaseConfiguration {

  @Bean
  CassandraCustomConversions cassandraCustomConversions() {
    List> converters = new ArrayList<>();
    converters.add(TupleToZonedDateTimeConverter.INSTANCE);
    converters.add(ZonedDateTimeToTupleConverter.INSTANCE);
    return new CassandraCustomConversions(converters);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy