【发布时间】:2014-03-06 14:34:14
【问题描述】:
有人在 Grails 项目中使用过 Graphenedb 吗?我正在尝试创建一个托管在 Appfog 中的 Neo4J 应用程序,我将连接到 GrapheneDB 中的 Neo4J DB,但我似乎什至无法弄清楚如何在 Grails 中启动 Neo4J。我做了以下事情:
在 Grails Tool Suite 中创建了新的 Grails 2.3.5 项目
-
在 BuildConfig 中,移除 hibernate 引用然后添加:
存储库 { mavenRepo 'http://m2.neo4j.org/releases'
plugins {compile ":neo4j:1.1.1" //遵循 Grails Neo4J GORM 指令
compile("org.neo4j:neo4j-rest-graphdb:1.6") //也试过 2.0.0
-
在数据源中添加:
grails { neo4j { 类型=“休息” location = "xxx.sb01.stations.graphenedb.com:xxxx/db/data"
使用静态 mapWith = "neo4j" 创建域类并生成控制器和视图
无论我做什么,都会出错:
解决获取依赖项的错误:在 grailsCentral 中找不到工件 org.neo4j:neo4j-rest-graphdb:jar:xxx
或
编译错误:启动失败:使用javac编译时出现编译错误..
其他人对带有 Grails 的 Neo4J 有疑问:
Error loading Neo4j from grails app
grails unable to connect to neo4j datastore
问题:
是否有关于如何在 Grails 上设置 Neo4j rest 的教程?
对于 Neo4J 来说,使用 Play 框架是否比使用 Grails 更好?在 Scala 中构建 Neo4J 应用程序的示例似乎比 Grails 更多。 http://www.neo4j.org/develop/scala
【问题讨论】: