-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
Our app has the grails redis & jesque plugins in our Grails 2 app and we're trying to add spring-session w/ redis. There seems to be an issue when creating the connection pool beans.
Here's my config
// exclude some dependancies that overlap with grails 2 and our apps deps
compile(':spring-session:1.2.2-RC1') {
excludes('jackson-core', 'spring-core', 'jackson-databind', 'spring-messaging', 'spring', 'jedis')
}springsession {
allow.persist.mutable = true
redis {
connectionFactory.hostName = "a.remote.host"
}
sessionStore = SessionStore.REDIS
maxInactiveIntervalInSeconds = 60
defaultSerializer = Serializer.JDK
}I get:
Message: Error creating bean with name 'redisConnectionFactory' defined in class grails.plugin.springsession.store.redis.config.RedisStoreSessionConfig: Unsatisfied dependency expressed through constructor argument with index 0 of type [redis.clients.jedis.JedisPoolConfig]: : No qualifying bean of type [redis.clients.jedis.JedisPoolConfig] is defined: expected single matching bean but found 3: redisPoolConfig,redisPoolConfigPersistent,poolConfig; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [redis.clients.jedis.JedisPoolConfig] is defined: expected single matching bean but found 3: redisPoolConfig,redisPoolConfigPersistent,poolConfig
Trying to set it up in resources.groovy I can get past the error, but the pool always has localhost
redisConnectionFactory(JedisConnectionFactory) { bean ->
poolConfig = ref("poolConfig")
bean.autowire = "byName"
bean.lazyInit = true
// hostName = "a.remote.host" <-- only way I can get hostName set
}Will keep debugging but wanted to report this if anyone else has had a similar experience or I'm missing something simple!
Reactions are currently unavailable