See #36064 and in particular #36064 (comment) for background. When using Testcontainers at development time with @ServiceConnection on a @Bean method, there's an increased need to use the name attribute of @ServiceConnection as the container instance isn't available for us to call getDockerImageName() on it. We should document this, describing when to use the name attribute and explaining why it's necessary.
See #36064 and in particular #36064 (comment) for background. When using Testcontainers at development time with
@ServiceConnectionon a@Beanmethod, there's an increased need to use thenameattribute of@ServiceConnectionas the container instance isn't available for us to callgetDockerImageName()on it. We should document this, describing when to use thenameattribute and explaining why it's necessary.