0

我正在使用弹簧靴1.2.5.RELEASE,我使用spring-boot-starter-redis.

但是我在 上发现了一个错误spring-boot-starter-redis,并且 spring-boot 已经修复了它。

错误在这里:

版本 1.6 GA(高斯林)

春季数据redis启动器异常

升级到 Spring Data Gosling RELEASE

现在我可以使用固定版本Version 1.6 GA1.2.5.RELEASE?如果不是我该怎么办?

下面是我的 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      
http://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>1.2.5.RELEASE</version>
</parent>

<groupId>com.mycompany</groupId>
<artifactId>tradove-backend-parent</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
    <module>mycompany-redis</module>
    <module>mycompany-common</module>
    <module>mycompany-email</module>
    <module>mycompany-file-system</module>
    <module>mycompany-domain</module>
    <module>mycompany-service</module>
    <module>mycompany-solr</module>
    <module>mycompany-sms</module>
</modules>

<repositories>
    <repository>
        <id>nexus</id>
        <name>local private nexus</name>
        <url>http://maven.oschina.net/content/groups/public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>nexus</id>
        <name>local private nexus</name>
        <url>http://maven.oschina.net/content/groups/public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>


<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <!-- data jpa -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>

    <!-- hateos -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-hateoas</artifactId>
    </dependency>

    <!-- data redis -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-redis</artifactId>
    </dependency>

    <!-- data solr-->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-solr</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-mail</artifactId>
    </dependency>


    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
    </dependency>


    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>com.jayway.restassured</groupId>
        <artifactId>rest-assured</artifactId>
        <version>2.3.3</version>
        <scope>test</scope>
    </dependency>


    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-configuration-processor</artifactId>
        <optional>true</optional>
    </dependency>

</dependencies>

4

1 回答 1

1

Spring Boot 通过导入 Spring Data 发布序列的 bom 来获取所有 Spring Data 模块的版本。要升级到包含 Spring Data Redis 1.6 的 Gosling 发布系列,请覆盖spring-data-releasetrain.versionpom 中的属性:

<properties>
    <spring-data-releasetrain.version>Gosling-RELEASE</spring-data-releasetrain.version>
</properties>
于 2015-09-16T02:39:10.417 回答