Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 未加载Neo4j非托管扩展Spring上下文_Java_Spring_Neo4j - Fatal编程技术网

Java 未加载Neo4j非托管扩展Spring上下文

Java 未加载Neo4j非托管扩展Spring上下文,java,spring,neo4j,Java,Spring,Neo4j,我正在尝试使用spring上下文支持非托管扩展。我一直在尝试以下资源: 我无法使用@context注释从spring上下文注入服务。我看不出我错过了什么 我已上载我的项目: 我在conf/neo4j-server.properties中有这一行配置 org.neo4j.server.thirdparty_jaxrs_classes=test.testload=/loader 这是日志文件中的错误: 2015年2月5日下午3:50:10 com.sun.jersey.server.imp

我正在尝试使用spring上下文支持非托管扩展。我一直在尝试以下资源:

我无法使用@context注释从spring上下文注入服务。我看不出我错过了什么

我已上载我的项目:

我在conf/neo4j-server.properties中有这一行配置

org.neo4j.server.thirdparty_jaxrs_classes=test.testload=/loader
这是日志文件中的错误:

2015年2月5日下午3:50:10 com.sun.jersey.server.impl.application.WebApplicationImpl\u启动 信息:正在启动Jersey应用程序,版本“Jersey:1.9 09/02/2011 11:17 AM” 2015年2月5日下午3:50:11 com.sun.jersey.server.impl.application.WebApplicationImpl\u启动 信息:正在启动Jersey应用程序,版本“Jersey:1.9 09/02/2011 11:17 AM” 2015年2月5日下午3:50:11 com.sun.jersey.api.core.PackagesResourceConfig init 信息:扫描包中的根资源和提供程序类: test.testload 2015年2月5日下午3:50:11 com.sun.jersey.api.core.ScanningResourceConfig logClasses 信息:找到根资源类: 类test.testload.HelloWorldResource 2015年2月5日下午3:50:11 com.sun.jersey.api.core.ScanningResourceConfig init 信息:找不到提供程序类。 2015年2月5日下午3:50:11 com.sun.jersey.server.impl.application.WebApplicationImpl\u启动 信息:正在启动Jersey应用程序,版本“Jersey:1.9 09/02/2011 11:17 AM” 2015年2月5日下午3:50:11 com.sun.jersey.spi.inject.Errors processErrorMessages 严重:在资源和/或提供程序类中检测到以下错误和警告: 严重:参数索引1处缺少构造函数public test.testload.HelloWorldResource(org.neo4j.graphdb.GraphDatabaseService,test.testload.service.TestService)的依赖项


我缺少什么可以让我访问spring上下文?为什么在:META-INF/services/org.neo4j.server.plugins.PluginLifecycle中调用插件生命周期类会被忽略?

a如果
PluginLifecycle
未通过serviceloader检测到,那么请删除
META-INF/services/org.neo4j.server.plugins.PluginLifecycle


而是移动您的
PluginLivecycle
实现(
ImportConfig
)对于在config
org.neo4j.server.thirdparty\u jaxrs\u类中公开的包
——在您的例子中,它们是
test.testload
而不是
test.testload.config
,实际上是因为必须在Jersey开始加载和注入东西之前加载。它们有服务器调用的生命周期方法。我删除了文件:
ETA-INF/services/org.neo4j.server.plugins.PluginLifecycle
,并将ImportConfig重新定位到
test.testload
包中。我收到了相同的错误:
severy:参数索引1处缺少构造函数public test.testload.HelloWorldResource(org.neo4j.graphdb.GraphDatabaseService,test.testload.service.TestService)的依赖项可能是相关的,或者是相同的问题。您看过GraphAware框架了吗?您只需使用纯SpringMVC控制器和Spring依赖注入即可。看看这些文档和示例,比如这一个,让我们知道你是否成功。你是否将所有依赖项都放在了neo4j插件文件夹中?例如,如果你在你的项目中做了:mvn dependency:copy dependencies->将所有这些JAR放入你的插件文件夹中。我将这些依赖JAR添加到插件文件夹中。我收到了相同的缺少依赖项错误。我将研究graphaware框架。谢谢你的时间和帮助。