无法使用spring-data-neo4j 2.2.1加载neo4j配置

无法使用spring-data-neo4j 2.2.1加载neo4j配置,neo4j,spring-data-neo4j,Neo4j,Spring Data Neo4j,我对Neo4j和Spring都是新手。我已经尽我所能做好我的家庭作业——如果有一位神奇的医生,我会向他致以最诚挚的歉意,因为我错过了所有的答案 目的是使用spring-data-Neo4j与Neo4j数据库交互。我在良好的关系中遵循了指南,取得了一些成功,但我想从书中使用的版本1.6.M02继续前进 尽管它不在spring-data-neo4j 2.2.1的Maven存储库中,但Maven包含的neo4j版本是1.8.1,据我所知是正确的版本。这也会像应该的那样引入Spring框架(3.1.4)

我对Neo4j和Spring都是新手。我已经尽我所能做好我的家庭作业——如果有一位神奇的医生,我会向他致以最诚挚的歉意,因为我错过了所有的答案

目的是使用spring-data-Neo4j与Neo4j数据库交互。我在良好的关系中遵循了指南,取得了一些成功,但我想从书中使用的版本1.6.M02继续前进

尽管它不在spring-data-neo4j 2.2.1的Maven存储库中,但Maven包含的neo4j版本是1.8.1,据我所知是正确的版本。这也会像应该的那样引入Spring框架(3.1.4)。因此,
pom.xml
看起来像:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>yet</groupId>
    <artifactId>another</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>cinecopy</name>

    <dependencies>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-neo4j</artifactId>
            <version>2.2.1.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>3.1.4.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>3.0</version>
        </dependency>


    </dependencies>
</project>
它指的是
testContext.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/data/neo4j
            http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd">

    <context:annotation-config/>
    <neo4j:config storeDirectory="target/config-test"/>

</beans>
考虑到
pom.xml
似乎可以正常工作,我觉得这很奇怪:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>yet</groupId>
    <artifactId>another</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>cinecopy</name>

    <dependencies>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j</artifactId>
            <version>1.6.M02</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-neo4j</artifactId>
            <version>2.0.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
    </dependencies> 
</project>

4.0.0
然而
另一个
0.0.1-快照
影印
org.neo4j
neo4j
1.6.M02
org.springframework.data
spring-data-neo4j
2.0.0.1版本
朱尼特
朱尼特
4.11

任何指导都将不胜感激

作为参考,
pom.xml
在Michael的输入之后(或者-声称做了我的家庭作业):


4.0.0
另一个
电影
0.0.1-快照
叶塔干
org.neo4j
neo4j
1.9
org.springframework.data
spring-data-neo4j
2.3.0.M1
朱尼特
朱尼特
4.11
cglib
cglib
2.2.2
罐子
编译
org.apache.geronimo.specs
geronimo-validation_1.0_规范
1.1
罐子
编译
org.slf4j
slf4j简单
1.7.3
罐子
编译
org.springframework
弹簧试验
3.1.4.1发布

然而,我没有遇到与Steve相同的“挂起”问题,但到目前为止,我所做的只是加载ApplicationContext

使用最新发布的2.3.0.M1与Neo4j 1.9兼容请确保pom.xml中也有cglib(这就是它所抱怨的)cglib cglib 2.2.2谢谢,Michael-我之前看到它抱怨cglib,但包括3.0。工程只是粉碎与2.2和2.3.0.M1/1.9。谢谢你的工作!
Failed to load ApplicationContext [...]
Cannot load configuration class: org.springframework.data.neo4j.config.Neo4jConfiguration
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>yet</groupId>
    <artifactId>another</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>cinecopy</name>

    <dependencies>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j</artifactId>
            <version>1.6.M02</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-neo4j</artifactId>
            <version>2.0.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
    </dependencies> 
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
        http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>another</groupId>
    <artifactId>cine</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>yetagain</name>

    <dependencies>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j</artifactId>
            <version>1.9</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-neo4j</artifactId>
            <version>2.3.0.M1</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>2.2.2</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-validation_1.0_spec</artifactId>
            <version>1.1</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.3</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>3.1.4.RELEASE</version>
        </dependency>

    </dependencies>
</project>