org.springframework.test.context.DynamicPropertyRegistry Java Examples
The following examples show how to use
org.springframework.test.context.DynamicPropertyRegistry.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PostRepositoryTest.java From spring-reactive-sample with GNU General Public License v3.0 | 5 votes |
@DynamicPropertySource static void resgiterDynamicProperties(DynamicPropertyRegistry registry) { registry.add("spring.r2dbc.url", () -> "r2dbc:postgresql://" + postgreSQLContainer.getHost() + ":" + postgreSQLContainer.getFirstMappedPort() + "/" + postgreSQLContainer.getDatabaseName()); registry.add("spring.r2dbc.username", () -> postgreSQLContainer.getUsername()); registry.add("spring.r2dbc.password", () -> postgreSQLContainer.getPassword()); }
Example #2
Source File: ReactiveWebApplicationTest.java From sdn-rx with Apache License 2.0 | 4 votes |
@DynamicPropertySource static void neo4jProperties(DynamicPropertyRegistry registry) { registry.add("org.neo4j.driver.uri", neo4jContainer::getBoltUrl); registry.add("org.neo4j.driver.authentication.username", () -> "neo4j"); registry.add("org.neo4j.driver.authentication.password", neo4jContainer::getAdminPassword); }
Example #3
Source File: ReactiveTemplateExampleTest.java From sdn-rx with Apache License 2.0 | 4 votes |
@DynamicPropertySource static void neo4jProperties(DynamicPropertyRegistry registry) { registry.add("org.neo4j.driver.uri", neo4jContainer::getBoltUrl); registry.add("org.neo4j.driver.authentication.username", () -> "neo4j"); registry.add("org.neo4j.driver.authentication.password", neo4jContainer::getAdminPassword); }
Example #4
Source File: RepositoryIT.java From sdn-rx with Apache License 2.0 | 4 votes |
@DynamicPropertySource static void neo4jProperties(DynamicPropertyRegistry registry) { registry.add("org.neo4j.driver.uri", neo4jContainer::getBoltUrl); registry.add("org.neo4j.driver.authentication.username", () -> "neo4j"); registry.add("org.neo4j.driver.authentication.password", neo4jContainer::getAdminPassword); }
Example #5
Source File: ThirdApplicationIT.java From blog-tutorials with MIT License | 4 votes |
@DynamicPropertySource static void datasourceConfig(DynamicPropertyRegistry registry) { registry.add("spring.datasource.url", postgreSQLContainer::getJdbcUrl); registry.add("spring.datasource.password", postgreSQLContainer::getPassword); registry.add("spring.datasource.username", postgreSQLContainer::getUsername); }
Example #6
Source File: BaseIT.java From blog-tutorials with MIT License | 4 votes |
@DynamicPropertySource static void datasourceConfig(DynamicPropertyRegistry registry) { registry.add("spring.datasource.url", postgreSQLContainer::getJdbcUrl); registry.add("spring.datasource.password", postgreSQLContainer::getPassword); registry.add("spring.datasource.username", postgreSQLContainer::getUsername); }
Example #7
Source File: ApplicationIT.java From blog-tutorials with MIT License | 4 votes |
@DynamicPropertySource static void postgresqlProperties(DynamicPropertyRegistry registry) { registry.add("spring.datasource.url", postgreSQLContainer::getJdbcUrl); registry.add("spring.datasource.password", postgreSQLContainer::getPassword); registry.add("spring.datasource.username", postgreSQLContainer::getUsername); }
Example #8
Source File: CreatePersonIT.java From blog-tutorials with MIT License | 4 votes |
@DynamicPropertySource static void postgresqlProperties(DynamicPropertyRegistry registry) { registry.add("spring.datasource.url", postgreSQLContainer::getJdbcUrl); registry.add("spring.datasource.password", postgreSQLContainer::getPassword); registry.add("spring.datasource.username", postgreSQLContainer::getUsername); }
Example #9
Source File: PostRepositoryWithTestContainersTest.java From spring-reactive-sample with GNU General Public License v3.0 | 4 votes |
@DynamicPropertySource static void neo4jProperties(DynamicPropertyRegistry registry) { registry.add("org.neo4j.driver.uri", neo4jContainer::getBoltUrl); registry.add("org.neo4j.driver.authentication.username", () -> "neo4j"); registry.add("org.neo4j.driver.authentication.password", neo4jContainer::getAdminPassword); }
Example #10
Source File: AbstractIntegrationTest.java From testcontainers-java with MIT License | 4 votes |
@DynamicPropertySource static void redisProperties(DynamicPropertyRegistry registry) { redis.start(); registry.add("spring.redis.host", redis::getContainerIpAddress); registry.add("spring.redis.port", redis::getFirstMappedPort); }