微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Springboot 应用程序无法启动

如何解决Springboot 应用程序无法启动

我的 pom.xml 中有这些依赖项:

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-redis</artifactId>
        <version>2.3.3.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-redis</artifactId>
        <version>2.3.3.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>redis.clients</groupId>
        <artifactId>jedis</artifactId>
        <version>3.3.0</version>
        <type>jar</type>
    </dependency>

应用程序无法启动util 我打开redis服务器,报错如下:

***************************

应用程序无法启动


说明:

尝试调用不存在的方法。尝试是从以下位置进行的:

org.springframework.boot.autoconfigure.data.redis.RedisConnectionConfiguration.getStandaloneConfig(RedisConnectionConfiguration.java:69)

以下方法不存在:

'void org.springframework.data.redis.connection.RedisStandaloneConfiguration.setUsername(java.lang.String)'

方法的类 org.springframework.data.redis.connection.RedisStandaloneConfiguration 可从以下位置获得:

jar:file:/Users/chenmin/.m2/repository/org/springframework/data/spring-data-redis/2.3.3.RELEASE/spring-data-redis-2.3.3.RELEASE.jar!/org/springframework/data/redis/connection/RedisStandaloneConfiguration.class

从以下位置加载了类层次结构:

org.springframework.data.redis.connection.RedisStandaloneConfiguration: file:/Users/chenmin/.m2/repository/org/springframework/data/spring-data-redis/2.3.3.RELEASE/spring-data-redis-2.3.3.RELEASE.jar

操作:

更正应用程序的类路径,使其包含一个兼容版本的 org.springframework.data.redis.connection.RedisStandaloneConfiguration

为什么?这背后的原理是什么?如果不打开Redis服务器就无法导入依赖,为什么我在pom.xml中没有看到红色波浪线?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。