use of org.springframework.boot.actuate.metrics.repository.redis.RedisMetricRepository in project cas by apereo.
the class CasMetricsRepositoryConfiguration method redisMetricWriter.
@ConditionalOnProperty(prefix = "cas.metrics.redis", name = "prefix")
@Bean
@ExportMetricWriter
public MetricWriter redisMetricWriter() {
final MetricsProperties.Redis redis = casProperties.getMetrics().getRedis();
final RedisObjectFactory factory = new RedisObjectFactory();
final RedisConnectionFactory connectionFactory = factory.newRedisConnectionFactory(redis);
return new RedisMetricRepository(connectionFactory, redis.getPrefix(), redis.getKey());
}
Aggregations