- 浏览: 2566995 次
- 性别:
- 来自: 成都
-
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
neo4j(2)Sample project XML Configuration
1. Spring Configuration
###############################################
# neo4j database
###############################################
neo4j.store.directory=c://neo4j.db
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
http://www.springframework.org/schema/data/neo4j
http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.1.xsd">
<neo4j:repositories base-package="com.sillycat.easynosql.dao.neo4j.repository"/>
<neo4j:config storeDirectory="${neo4j.store.directory}"/>
<bean id="initNeo4jService" class="com.sillycat.easynosql.dao.neo4j.init.InitNeo4jService" init-method="init"/>
</beans>
And I change the annotation for service layer to
<!--
<bean id="userService" class="com.sillycat.easynosql.service.impl.UserServiceMongoImpl">
</bean>
<bean id="userService" class="com.sillycat.easynosql.service.impl.UserServiceNeo4jImpl">
</bean>
<bean id="userService" class="com.sillycat.easynosql.service.impl.UserServiceRedisImpl">
</bean>
-->
<bean id="userService" class="com.sillycat.easynosql.service.impl.UserServiceRedisImpl">
</bean>
Make UserService to interface.
2. My jar dependency:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.1.0.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>${neo4j.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher</artifactId>
<version>${neo4j.cypher.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-dsl</artifactId>
<version>${neo4j.cypher.dsl.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>${spring.data.redis.version}</version>
</dependency>
<properties>
<spring.data.mongodb.version>1.1.0.BUILD-SNAPSHOT</spring.data.mongodb.version>
<spring.core.version>3.1.1.RELEASE</spring.core.version>
<neo4j.kernel.version>1.7</neo4j.kernel.version>
<neo4j.cypher.version>1.7</neo4j.cypher.version>
<neo4j.cypher.dsl.version>1.7</neo4j.cypher.dsl.version>
<spring.data.redis.version>1.0.0.RC1</spring.data.redis.version>
</properties>
This is just some initial idea from one simple example. I think I will study more about neo4j later.
references:
http://krams915.blogspot.com/2012/03/spring-mvc-31-implement-crud-with_8518.html
1. Spring Configuration
###############################################
# neo4j database
###############################################
neo4j.store.directory=c://neo4j.db
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
http://www.springframework.org/schema/data/neo4j
http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.1.xsd">
<neo4j:repositories base-package="com.sillycat.easynosql.dao.neo4j.repository"/>
<neo4j:config storeDirectory="${neo4j.store.directory}"/>
<bean id="initNeo4jService" class="com.sillycat.easynosql.dao.neo4j.init.InitNeo4jService" init-method="init"/>
</beans>
And I change the annotation for service layer to
<!--
<bean id="userService" class="com.sillycat.easynosql.service.impl.UserServiceMongoImpl">
</bean>
<bean id="userService" class="com.sillycat.easynosql.service.impl.UserServiceNeo4jImpl">
</bean>
<bean id="userService" class="com.sillycat.easynosql.service.impl.UserServiceRedisImpl">
</bean>
-->
<bean id="userService" class="com.sillycat.easynosql.service.impl.UserServiceRedisImpl">
</bean>
Make UserService to interface.
2. My jar dependency:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.1.0.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>${neo4j.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher</artifactId>
<version>${neo4j.cypher.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-dsl</artifactId>
<version>${neo4j.cypher.dsl.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>${spring.data.redis.version}</version>
</dependency>
<properties>
<spring.data.mongodb.version>1.1.0.BUILD-SNAPSHOT</spring.data.mongodb.version>
<spring.core.version>3.1.1.RELEASE</spring.core.version>
<neo4j.kernel.version>1.7</neo4j.kernel.version>
<neo4j.cypher.version>1.7</neo4j.cypher.version>
<neo4j.cypher.dsl.version>1.7</neo4j.cypher.dsl.version>
<spring.data.redis.version>1.0.0.RC1</spring.data.redis.version>
</properties>
This is just some initial idea from one simple example. I think I will study more about neo4j later.
references:
http://krams915.blogspot.com/2012/03/spring-mvc-31-implement-crud-with_8518.html
发表评论
-
Stop Update Here
2020-04-28 09:00 331I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 491NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 377Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 381Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 351Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 439Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 449Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 392Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 475VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 401Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 496NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 438Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 346Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 262GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 463GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 336GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 322Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 330Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 306Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 320Serverless with NodeJS and Tenc ...
相关推荐
2. **.project**:这是另一个Eclipse特定的文件,定义了项目的属性和构建设置。这个文件告诉Eclipse如何识别项目类型(在这种情况下是Java项目),以及如何构建和运行项目。在Neo4j项目中,可能包含了用于启动和测试...
2. **pom.xml**:如果项目是 Maven 项目,这个文件是 Maven 构建配置,包含了项目依赖和构建指令。 3. **src/main/java**:Java 源代码目录,其中可能有演示 Neo4j API 使用的类。 4. **src/main/resources**:可能...
接下来,我们需要配置MyBatis的主配置文件(mybatis-config.xml),在这里指定数据源和事务管理器,以便连接到Neo4j数据库。配置示例如下: ```xml <configuration> <property name="driver" value="org....
2. Cypher查询语言:Cypher是一种声明式、易于理解的语言,用于查询和操作图形数据。它的语法简洁,类似于SQL,但专为图形数据设计。 3. ACID事务:Neo4j支持事务处理,确保数据的一致性和完整性,符合ACID(原子性...
图数据库neo4j-community-5.24.2-windows版本,适用于国内无法访问neo4j官网的同学。
1. 添加依赖:在`pom.xml`中引入Spring Data Neo4j的依赖: ```xml <groupId>org.springframework.boot <artifactId>spring-boot-starter-data-neo4j ``` 2. 配置应用.properties或.yml文件: ```...
2. 配置`neo4j.conf`文件,包括设置数据目录、端口、认证等信息。 3. 启动Neo4j服务,可以通过命令行或提供的启动脚本来完成。 4. 使用Cypher查询语言通过HTTP或Bolt协议连接到数据库,发送一个简单的查询,如`...
2. **数据模型**:解释Neo4j中的核心概念——节点(Nodes)、关系(Relationships)和属性(Properties)。节点代表实体,关系描述实体间的联系,而属性则为节点和关系添加额外信息。 3. **图形数据库的优势**:...
图数据库neo4j-community-5.24.2-unix.tar版本,适用于国内无法访问neo4j官网的linux版本下载。
Chapter 2: Getting to Know Neo4j Chapter 3: Get Up and Running with Neo4j Chapter 4: Meet Cypher Chapter 5: Managing Your Data in Neo4j Chapter 6: Importing and Exporting Data Chapter 7: Querying Data...
neo4j api neo4j学习资料 neo4j教程 │ neo4j官方API(官方各种API的文档整理).7z │ neo4j数据迁移--初探(一).htm │ neo4j笔记.docx │ neo4j错误码状态码.html │ └─01.neo4j学习博客汇总 │ index.html └...
2. **下载安装包**: "neo4j-community-3.5.35"是Neo4j社区版的一个特定版本,版本号表示其发布的时间和功能更新。这个压缩包包含了在Linux上运行Neo4j所需的所有文件。 3. **解压安装包**: 在Linux终端中,使用`tar...
例如,用户可以利用Java API、Python的Py2neo、JavaScript的neo4j-driver等进行程序化操作。 总之,“neo4j-community-3.5.19-windows.rar”提供了在Windows环境下使用Neo4J的便利。图形数据库的灵活性和高效性使其...
- Neo4j Desktop支持从CSV、JSON、XML等多种格式导入数据,同时也方便导出数据到这些格式。这对于数据迁移和分析非常有用。 7. **版本控制**: - 用户可以创建数据库的快照,以便在需要时恢复到特定状态。此外,...
2. 灵活的数据结构:Neo4j 具有由数据记录之间存储的关系定义的灵活结构,可以存储复杂的关系数据。 3. 高性能的图引擎:Neo4j 具有成熟数据库的所有特性,包括 ACID 事物的支持、集群支持、备份与故障转移等。 ...
2. **Cypher查询语言**:Cypher是Neo4j用于查询和操作数据的声明式语言,类似于SQL但专为图形数据设计。它以简洁、易读的语法帮助用户快速查找和操作节点、边和路径。 3. **ACID事务**:Neo4j支持原子性、一致性、...
2. 初始化 Neo4j 的 Driver 对象,建立连接 3. 使用Cypher查询语言进行CRUD操作 4. 处理节点和关系 5. 事务管理和并发控制 6. 可能结合使用Spring Data Neo4j等框架提升开发效率 以上就是使用Java操作Neo4j数据库的...
- 添加Neo4j和Spring Data Neo4j的相关依赖到`pom.xml`文件。 - 创建一个配置类,配置Neo4j的数据源和实体扫描路径。 - 使用Spring Data Neo4j提供的Repository接口,定义数据访问操作。 - 在SpringMVC的...
2. **Cypher查询语言**:Cypher是Neo4j的声明式图查询语言,类似于SQL用于关系数据库。用户可以学习如何创建、更新、删除节点和关系,以及执行复杂的数据查询。文档将涵盖Cypher的基本语法、匹配模式、参数化查询、...
vue+neo4j+(neovis.js / neo4j-driver)纯前端实现知识图谱的集成 一、Neovis.js 不用获取数据直接连接数据库绘图 二、 neo4j-driver 能够直接通过前端获取数据。 三、vis.js 绘图 四、 echarts绘图 neo4j是什么? ...