mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Merge branch '3.2.x'
Closes gh-41123
This commit is contained in:
commit
9f1ee67225
|
@ -101,7 +101,8 @@ For example, a `PostgreSQLContainer` will create both `JdbcConnectionDetails` an
|
|||
If you want to create only a subset of the applicable types, you can use the `type` attribute of `@ServiceConnection`.
|
||||
====
|
||||
|
||||
By default `Container.getDockerImageName()` is used to obtain the name used to find connection details.
|
||||
By default `Container.getDockerImageName().getRepository()` is used to obtain the name used to find connection details.
|
||||
The repository portion of the Docker image name ignores any registry and the version.
|
||||
This works as long as Spring Boot is able to get the instance of the `Container`, which is the case when using a `static` field like in the example above.
|
||||
|
||||
If you're using a `@Bean` method, Spring Boot won't call the bean method to get the Docker image name, because this would cause eager initialization issues.
|
||||
|
|
Loading…
Reference in New Issue
Block a user