Eclipse下maven使用嵌入式(Embedded)Neo4j创建Hello World项目
新建一个maven工程,这里不赘述如何新建maven工程。
添加Neo4j jar到你的工程
有两种方式:
上网站官网下载jar包,根据自己的系统下载不同的压缩包,详细过程不描述,请自行搜索其他博客
通过maven获得jar包
pom.xml文件下添加dependency
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
nd.esp.com
MyNeo4j
0.0.1-SNAPSHOT
jar
MyNeo4j
http://maven.apache.org
UTF-8
org.neo4j
neo4j-slf4j
2.3.3
Hello World 程序
/*
* Licensed to Neo Technology under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Neo Technology licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIN