spring - session 版本兼容问题

错误信息: Correct the classpath of your application so that it contains a single, compatible version of org.springframework.boot.autoconfigure.session.RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration、

一堆依赖版本不兼容的问题,

可以通过spring.io 来管理

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.spring.platform</groupId>
            <artifactId>platform-bom</artifactId>
            <version>Cairo-SR4</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Finchley.SR1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        
    </dependencies>
</dependencyManagement>

我这里通过spring.io管理的时候,一个子工程中,添加了一个spring-session的依赖,这个版本号居然要自己添加,不知道为什么。

      <dependency>
          <groupId>org.springframework.session</groupId>
          <artifactId>spring-session</artifactId>
          <version>1.3.0.RELEASE</version>
      </dependency>
  

于是随便添加了一个版本号,

但是运行的时候就报上面那个错,

然后将版本号改为

 <version>1.2.0.RELEASE</version>

就好了。额(⊙o⊙)…,

猜你喜欢

转载自www.cnblogs.com/goblinn/p/9728000.html
今日推荐