Fix datasource example

This commit is contained in:
Stephane Nicoll 2017-05-15 00:35:08 +03:00
parent 0e7b037750
commit 800ec29f70
2 changed files with 4 additions and 4 deletions

View File

@ -1526,9 +1526,9 @@ is going to be used at runtime for more details.
There is a catch however. Because the actual type of the connection pool is not exposed, There is a catch however. Because the actual type of the connection pool is not exposed,
no keys are generated in the metadata for your custom `DataSource` and no completion is no keys are generated in the metadata for your custom `DataSource` and no completion is
available in your IDE (The `DataSource` interface doesn't expose any property). Also, if available in your IDE (The `DataSource` interface doesn't expose any property). Also, if
you happen to _only_ have Hikari on the classpath, this basic setup will not work because you happen to have Hikari on the classpath, this basic setup will not work because Hikari
Hikari has no `url` parameter (but a `jdbcUrl` parameter). You will have to rewrite has no `url` parameter (but a `jdbcUrl` parameter). You will have to rewrite your
your configuration as follows: configuration as follows:
[source,properties,indent=0] [source,properties,indent=0]
---- ----

View File

@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(properties = "app.datasource.url=jdbc:h2:mem:basic;DB_CLOSE_DELAY=-1") @SpringBootTest(properties = "app.datasource.jdbcUrl=jdbc:h2:mem:basic;DB_CLOSE_DELAY=-1")
@Import(BasicDataSourceExample.BasicDataSourceConfiguration.class) @Import(BasicDataSourceExample.BasicDataSourceConfiguration.class)
public class BasicDataSourceExampleTests { public class BasicDataSourceExampleTests {