Neo4J OGM Java 连接建立问题
Neo4J OGM Java connection establishment issues
我正在使用 Neo4J 3.2.0 社区版,我能够使用传统的 java 驱动程序和 运行 Cypher 查询正确连接和建立连接。
但是,我想创建丰富的数据模型,所以我导入了以下依赖项:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-core</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-bolt-driver</artifactId>
<version>2.1.3</version>
</dependency>
Post那个,我写了下面的代码来建立连接:
Configuration configuration = new Configuration();
configuration.driverConfiguration().setDriverClassName("org.neo4j.ogm.drivers.bolt.driver.BoltDriver")
.setURI("bolt://localhost:7687");
SessionFactory sessionFactory = new SessionFactory(configuration, "org.neo4j.example.domain");
Session session = sessionFactory.openSession();
但无论天气如何,我的 Neo4j 服务器是否打开,它都会建立连接,并且日志不会显示任何错误,日志系统只有以下三行:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
如有任何帮助,我们将不胜感激。
添加以下依赖项修复它:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
</dependency>
我正在使用 Neo4J 3.2.0 社区版,我能够使用传统的 java 驱动程序和 运行 Cypher 查询正确连接和建立连接。
但是,我想创建丰富的数据模型,所以我导入了以下依赖项:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-core</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-bolt-driver</artifactId>
<version>2.1.3</version>
</dependency>
Post那个,我写了下面的代码来建立连接:
Configuration configuration = new Configuration();
configuration.driverConfiguration().setDriverClassName("org.neo4j.ogm.drivers.bolt.driver.BoltDriver")
.setURI("bolt://localhost:7687");
SessionFactory sessionFactory = new SessionFactory(configuration, "org.neo4j.example.domain");
Session session = sessionFactory.openSession();
但无论天气如何,我的 Neo4j 服务器是否打开,它都会建立连接,并且日志不会显示任何错误,日志系统只有以下三行:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
如有任何帮助,我们将不胜感激。
添加以下依赖项修复它:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
</dependency>