pull/20830/head
Stephane Nicoll 5 years ago
parent 1df8b5886c
commit b7ac83a830

@ -1965,7 +1965,7 @@ Make sure to disable `spring.jpa.hibernate.ddl-auto` if you use `schema.sql`.
[[howto-initialize-a-database-using-r2dc]] [[howto-initialize-a-database-using-r2dbc]]
=== Initialize a Database Using R2DBC === Initialize a Database Using R2DBC
If you are using R2DBC, the regular `DataSource` auto-configuration backs off so none of the options described above can be used. If you are using R2DBC, the regular `DataSource` auto-configuration backs off so none of the options described above can be used.

@ -3906,7 +3906,7 @@ TIP: You do not need to specify a driver class name, since Spring Boot obtains t
NOTE: At least the url should be provided. NOTE: At least the url should be provided.
Information specified in the URL takes precedence over individual properties, i.e. `name`, `username`, `password` and pooling options. Information specified in the URL takes precedence over individual properties, i.e. `name`, `username`, `password` and pooling options.
TIP: The "`How-to`" section includes a <<howto.adoc#howto-initialize-a-database-using-r2dc, section on how to initialize a database>>. TIP: The "`How-to`" section includes a <<howto.adoc#howto-initialize-a-database-using-r2dbc, section on how to initialize a database>>.
To customize the connections created by a `ConnectionFactory`, i.e., set specific parameters that you do not want (or cannot) configure in your central database configuration, you can use a `ConnectionFactoryOptionsBuilderCustomizer` `@Bean`. To customize the connections created by a `ConnectionFactory`, i.e., set specific parameters that you do not want (or cannot) configure in your central database configuration, you can use a `ConnectionFactoryOptionsBuilderCustomizer` `@Bean`.
The following example shows how to manually override the database port while the rest of the options is taken from the application configuration: The following example shows how to manually override the database port while the rest of the options is taken from the application configuration:

@ -29,7 +29,7 @@ import org.springframework.test.web.reactive.server.WebTestClient;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.r2dc.generate-unique-name=true") @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.r2dbc.generate-unique-name=true")
class SampleR2dbcApplicationTests { class SampleR2dbcApplicationTests {
@Autowired @Autowired

Loading…
Cancel
Save