Spring Boot: 3.4.2
I just started using a redis testcontainer and notice that using @ServiceConnection
does take the spring.data.redis.ssl.enabled
property from application.yml into account.
My expectation would be, that the @ServiceConnection
will overrule the default config in this case, like it does for host, port etc.
org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails
has no property to allow enabling/disabling ssl.
Comment From: wilkinsona
This is something that connection details, and therefore @ServiceConnection
, does not yet support. #41137 is tracking some cross-cutting changes that the support for each specific service, such as Redis, could then build upon.
In the meantime, the assumption is that you will want to use SSL so that you can test that the app's client-side SSL configuration is correct and that it can establish a secure connection to Redis over SSL. You can use the properties
attribute on @SpringBootTest
or @TestPropertySource
to disable SSL if this isn't what you want.