暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Springboot+Neo4j maven仓库版本

Neo4j权威指南 2021-05-16
1888

    近期很多读者反馈最多的问题是,文章里Springboot+Neo4j 初级框架搭建(一)Springboot+Neo4j 初级增删改查(二)以及其他几篇文章出现引用报错,或者Model层无法引用@NodeEntity等导致程序运行不起来。主要原因是大家用到的springboot版本和文章里不一致,所以依赖的一些包也没有指定,就会出现一些问题。

所以把引用的全部maven包以及对应版本贴出来供大家参考。这个是自己项目用到的,按照这个来肯定是可以运行的。pom.xml文件如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.8.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.abcft</groupId>
    <artifactId>insustry-graph-management</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>insustry-graph-management</name>
    <description>Management System</description>
    <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    </properties>
    <profiles>
    <profile>
    <id>local</id>
    <properties>
    <spring.profiles.active>local</spring.profiles.active>
    <docker.image.prefix>industrygraphmanagement</docker.image.prefix>
    </properties>
    <activation>
    <!-- 设置默认激活这个配置 -->
    <activeByDefault>true</activeByDefault>
    </activation>
    </profile>
    <profile>
    <id>prod</id>
    <properties>
    <spring.profiles.active>prod</spring.profiles.active>
    </properties>
    </profile>
    </profiles>
    <dependencies>
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter</artifactId>
    </dependency>


    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
    </dependency>
    <dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.2</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <!--mybatis-->
    <dependency>
    <groupId>org.mybatis.generator</groupId>
    <artifactId>mybatis-generator-core</artifactId>
    <version>1.3.4</version>
    </dependency>
    <dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>2.1.0</version>
    </dependency>
    <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid</artifactId>
    <version>1.1.6</version>
    </dependency>
    <!--mysql-->
    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.47</version>
    <scope>runtime</scope>
    </dependency>
    <!--neo4j-->
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-neo4j</artifactId>
    </dependency>
    <!-- 扫描路径,版本为2.21b不然的话在服务器上 neo4j mapper不生效 -->
    <dependency>
    <groupId>io.github.lukehutch</groupId>
    <artifactId>fast-classpath-scanner</artifactId>
    <version>2.21</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>27.0.1-jre</version>
    </dependency>
    <!--ftp-->
    <dependency>
    <groupId>commons-net</groupId>
    <artifactId>commons-net</artifactId>
    <version>3.3</version>
    </dependency>
    <dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>3.17</version>
    </dependency>
    <dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>3.17</version>
    </dependency>
    <!--jwt-->
    <dependency>
    <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt</artifactId>
    <version>0.9.1</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-test</artifactId>
    <version>5.1.9.RELEASE</version>
    <scope>compile</scope>
    </dependency>
    </dependencies>


    <build>
    <plugins>
    <plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    </plugin>
    </plugins>
        </build>
    </project>

        里边有一些用不到的可以删除掉,希望对大家有用。
        彩蛋又来了!!!下篇文章我们讲讲neo4j的分页功能。


    - 本期完 -


    有疑问请点赞哈,我会及时回复。由于微信限制了公众号留言功能,有问题你可以直接发公众号聊天,我会在下期文章末尾解答你的问题。


    为方便看最新内容,长按下图图片记得关注哦  




    文章转载自Neo4j权威指南,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

    评论