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

generator.server.springboot.database.redis.RedisDatabaseConfiguration.mustache Maven / Gradle / Ivy

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

import {{packageName}}.wire.redis.infrastructure.secondary.JSR310DateConverters.DateToZonedDateTimeConverter;
import {{packageName}}.wire.redis.infrastructure.secondary.JSR310DateConverters.ZonedDateTimeToDateConverter;
import java.util.List;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.redis.core.convert.RedisCustomConversions;
import org.springframework.data.redis.repository.configuration.EnableRedisRepositories;

@Configuration
@EnableRedisRepositories({ "{{packageName}}" })
@Import(value = RedisAutoConfiguration.class)
class RedisDatabaseConfiguration {

  @Bean
  public RedisCustomConversions redisCustomConversions() {
    return new RedisCustomConversions(List.of(DateToZonedDateTimeConverter.INSTANCE, ZonedDateTimeToDateConverter.INSTANCE));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy