Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-21-2022 02:14 PM - last edited on 06-22-2022 04:10 PM by michael_hunger
Hi,
I have a problem about running any test of AppApplicationTests.
When I run with docker and try any request, I cannot have any issue.
org.neo4j.driver.exceptions.AuthenticationException: The client is unauthorized due to authentication failure.
How can I fix this codes snippet shown below.
@DynamicPropertySource
static void properties(DynamicPropertyRegistry registry) {
registry.add("spring.neo4j.authentication.username", () -> "neo4j");
registry.add("spring.neo4j.authentication.password", () -> "123456");
registry.add("spring.neo4j.uri", () -> container.getBoltUrl());
}
Here is my repository : Project Link
Solved! Go to Solution.
06-23-2022 04:19 AM
Here is the solution
The issue disappeared when the password changed to ``````container.getAdminPassword()``
@DynamicPropertySource static void properties(DynamicPropertyRegistry registry) { registry.add("spring.neo4j.authentication.username", () -> "neo4j"); registry.add("spring.neo4j.authentication.password", () -> container.getAdminPassword()); registry.add("spring.neo4j.uri", () -> container.getBoltUrl()); }
06-23-2022 04:19 AM
Here is the solution
The issue disappeared when the password changed to ``````container.getAdminPassword()``
@DynamicPropertySource static void properties(DynamicPropertyRegistry registry) { registry.add("spring.neo4j.authentication.username", () -> "neo4j"); registry.add("spring.neo4j.authentication.password", () -> container.getAdminPassword()); registry.add("spring.neo4j.uri", () -> container.getBoltUrl()); }
All the sessions of the conference are now available online