您当前的位置: 首页 >  Java

Dongguo丶

暂无认证

  • 2浏览

    0关注

    472博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Neo4j Movies Demo App in java with jdbc

Dongguo丶 发布时间:2017-11-23 16:08:12 ,浏览量:2

Neo4j官方网站

在官方网站中看到有一个适合初学者学习的web demo  传送门:Using Neo4j from Java

Neo4j的示例web项目。前端页面实现电影搜索,电影的细节,和演员和电影的图可视化。每个后端实现显示如何连接到Neo4j不同的搜索语言和驱动程序。

官网上是这样说的:

The Example Project
The Neo4j example project is a small, one page webapp for the movies database built into the Neo4j tutorial.The front-end page is the same for all drivers: movie search, movie details, and a graph visualization of actors and movies.Each backend implementation shows you how to connect to Neo4j from each of the different languages and drivers.
You can learn more about our small, consistent example project across many different language drivers here .You will find the implementations for all drivers as individual GitHub repositories , which you can clone and deploy directly.
 

那就到github中下载这个案例吧,传送门:Neo4j Movies Demo App in java with jdbc

官网上有详细的步骤:点击打开链接

将github的Maven项目先下载下来解压导入ide中(我的是eclipse)
同时,创建一个新的No4j的数据库
执行命令
:play movies
很快案例所需要的电影的数据就导入到了数据库中
项目导入完成,Maven已经将所需要的jar下载好了
这时,eclipse报错:

说需要scala-lang的jar,于是我到Mavenrepository找到它的依赖
         
            org.scala-lang
            scala-library
            2.10.2
        
    

但是错误还是没有消失,于是我试着换了比较新的版本2.11.11错误消失了。
然后选择Maven =》 Update Project,项目已经准备就绪,就差运行了。
运行前要将 compile exec:java中的username,paasword换成自己的账号密码,否则会报错提示没有权限
官方提示项目所需jdk最好为1.8,所以我将porm文件中的jdk版本从1.7改为了1.8,
github上的提示是运行 compile exec:java命令,运行这个命令服务启动正常,
访问 http://localhost:8080
下面就可以研究这个demo了。
 

关注
打赏
1638062488
查看更多评论
立即登录/注册

微信扫码登录

0.0383s