You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So as a dummy for both bucket4j and redis I had massive failstart with this spring boot starter (0.8.1 due to limited to Spring Boot 2.7 for the moment).
Please do not take this as a rant but as a list of pains and a starting point for improvement.
So my expectation of any Spring Boot Starter (including this one) is:
I do not need to declare my own beans, as they are loaded from my application properties
If I provide my own bean, the starter bean is not loaded (@ConditionalOnMissingBean)
There are sensible defaults for the properties (ports=default port, ip=localhost)
If there aren't sensible default properties possible and I do not provide the required ones it fails to boot with an error message.
Spring Boot starters complement each other if possible
What I encountered in this Spring Boot starter is quite different:
Each Redis configuration I looked at required to declare some kind of Redis connection bean
The required connection information for the beans in 1. where not read from application properties
There are no properties regarding the redis connection here as it seems.
Because of the missing beans - despite configuring a dedicated redis backend - the application launched but did not load the configuration at all with no errors being logged. I had to debug log through bean configuration to figure out why the different Configurations (I tried lettuce, jedis, springdata, ...) did not load. Especially in combination with Readme: (Redis) reactive hints not idiot proof #208 this can lead to frustration.
The spring-boot-starter-data-redis can provide either lettuce or jedis configuration. Nevertheless this library does not take these into account and demands either it's own Jedis pool (problem: the redis starter creates a pool but does not make it available as a bean) or a lettuce RedisClient which is also not provided as a bean (maybe it did in the past? I can't tell).
It would be nice if these could be interoperable. For the now removed (see Why was support for redis-springdata removed in 0.10.1? #209) RedisSpringDataBucket4jConfiguration instead of a @ConditionalOnBean(RedisCommands.class) it seem would have been sufficient to require a redisConnectionFactory instead (?).
So from a technical point of view it's hard to me to evaluate why things are the way they are. Maybe there are good reasons. Depending on the feedback I might be able to throw in a PR or two.
The text was updated successfully, but these errors were encountered:
So as a dummy for both bucket4j and redis I had massive failstart with this spring boot starter (0.8.1 due to limited to Spring Boot 2.7 for the moment).
Please do not take this as a rant but as a list of pains and a starting point for improvement.
So my expectation of any Spring Boot Starter (including this one) is:
@ConditionalOnMissingBean
)What I encountered in this Spring Boot starter is quite different:
It would be nice if these could be interoperable. For the now removed (see Why was support for redis-springdata removed in 0.10.1? #209) RedisSpringDataBucket4jConfiguration instead of a
@ConditionalOnBean(RedisCommands.class)
it seem would have been sufficient to require aredisConnectionFactory
instead (?).So from a technical point of view it's hard to me to evaluate why things are the way they are. Maybe there are good reasons. Depending on the feedback I might be able to throw in a PR or two.
The text was updated successfully, but these errors were encountered: