1 spring-boot-starter-parent: 2.1.9->2.3.4 升级到遇到的问题
1 jedis报错:NoClassDefFoundError: redis/clients/jedis/util/SafeEncoder
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<exclusions>
<exclusion>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</exclusion>
</exclusions>
</dependency>
点进去:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>2.3.4.RELEASE</version>
<scope>compile</scope>
</dependency>
继续:可看到这里定义的jedis版本为3.3.0,外层pom.xml中在引入jedis依赖时的版本要和这里保持一致
<properties>
<springdata.keyvalue>2.3.4.RELEASE</springdata.keyvalue>
<awaitility>4.0.2</awaitility>
<jta>1.1</jta>
<beanutils>1.9.2</beanutils>
<xstream>1.4.12</xstream>
<pool>2.7.0</pool>
<lettuce>5.3.4.RELEASE</lettuce>
<jedis>3.3.0</jedis>
<multithreadedtc>1.01</multithreadedtc>
<netty>4.1.51.Final</netty>
<java-module-name>spring.data.redis</java-module-name>
</properties>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>3.3.0</version>
</dependency>
2 javax包没有了,需要自己手动引入
javax.validation;
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>