jetcache icon indicating copy to clipboard operation
jetcache copied to clipboard

报错jedis问题,不能使用lettuce吗?

Open zhengjiaao opened this issue 2 months ago • 3 comments

<dependencies> 
   <!--redis-->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-redis</artifactId>
        <version>2.3.12.RELEASE</version>
        <exclusions>
            <exclusion>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>io.lettuce</groupId>
        <artifactId>lettuce-core</artifactId>
        <version>5.3.7.RELEASE</version>
        <scope>compile</scope>
    </dependency>
    <!--redis 注解缓存:支持内存/远程redis/双级缓存(内存+远程redis)-->
    <!--<dependency>
        <groupId>com.alicp.jetcache</groupId>
        <artifactId>jetcache-starter-redis</artifactId>
        <version>2.7.5</version>
    </dependency>-->
    <dependency>
        <groupId>com.alicp.jetcache</groupId>
        <artifactId>jetcache-starter-redis-lettuce</artifactId>
        <version>2.7.5</version>
    </dependency>
</dependencies>

为什么还是报错:jedis问题,不能使用lettuce吗? Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.HostAndPort Caused by: java.lang.NoClassDefFoundError: redis/clients/jedis/HostAndPort

zhengjiaao avatar May 31 '24 06:05 zhengjiaao