Last active
May 23, 2025 11:16
-
-
Save meistermeier/bf66dd4147d1887887c46afe53fdc201 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.testcontainers:neo4j:1.21.0 | |
//DEPS org.neo4j.driver:neo4j-java-driver:5.28.5 | |
import org.neo4j.driver.AuthTokens; | |
import org.neo4j.driver.GraphDatabase; | |
import org.testcontainers.containers.Neo4jContainer; | |
import org.testcontainers.utility.DockerImageName; | |
public class deprecation_fun { | |
public static void main(String... args) { | |
neo4jRun("2025.03-community"); | |
neo4jRun("2025.04-community"); | |
} | |
private static void neo4jRun(String tag) { | |
Neo4jContainer<?> neo4j = new Neo4jContainer<>(DockerImageName.parse("neo4j").withTag(tag)); | |
neo4j.start(); | |
var driver = GraphDatabase.driver(neo4j.getBoltUrl(), AuthTokens.basic("neo4j", neo4j.getAdminPassword())); | |
var summary = driver.executableQuery("MATCH (n) RETURN id(n)").execute().summary(); | |
System.out.println(summary.notifications().get(0).description()); | |
driver.close(); | |
neo4j.stop(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment