spring cloud

<spring-cloud.version>Greenwich.SR3</spring-cloud.version>

注入Redis 时候:

    @Bean("jedisConnectionFactory")
public RedisConnectionFactory jedisConnectionFactory() {
RedisStandaloneConfiguration config = new RedisStandaloneConfiguration();
config.setHostName("127.0.0.1");
config.setPort();
config.setPassword("");
return new JedisConnectionFactory(config);//提示这个错误
}

出现 :

java: 无法访问redis.clients.jedis.JedisPoolConfig   找不到redis.clients.jedis.JedisPoolConfig的类文件

添加红色部分的依赖:

 <!--Redis start-->

        <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency> <!--<dependency>-->
<!--<groupId>org.springframework.session</groupId>-->
<!--<artifactId>spring-session-data-redis</artifactId>-->
<!--</dependency>-->
<!--Redis end--> <dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<type>jar</type>
</dependency> <dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
</dependency>

spring cloud java: 无法访问redis.clients.jedis.JedisPoolConfig 找不到redis.clients.jedis.JedisPoolConfig的类文件的更多相关文章

  1. 无法访问org.springframework.core.NestedRuntimeException 找不到org.springframework.core.NestedRuntimeException的类文件

    在学习springAOP时,出现如下异常: 无法访问org.springframework.core.NestedRuntimeException 找不到org.springframework.cor ...

  2. spring cloud Eureka server 问题 Spring Cloud java.lang.TypeNotPresentException

    版本: spring-cloud.version : Greenwich.SR2 pom配置: <project xmlns="http://maven.apache.org/POM/ ...

  3. spring cloud:通过client访问consul集群(spring cloud hoxton sr8 / spring boot 2.3.4)

    一,为什么要搭建consul的client? 1,网上的很多资料,访问consul时用的单机模式,这样是不可以直接在生产环境中使用的 还有一些资料,搭建了consul的集群后,直接访问集群中的某一个i ...

  4. spring .cloud ------------java.lang.RuntimeException: com.netflix.client.ClientException,Caused by: java.lang.IllegalArgumentException: MIME type may not contain reserved characters

    1.问题的发生 Feign在默认情况下使用的是JDK原生的URLConnection发送HTTP请求,没有连接池,但是对每个地址会保持一个长连接,即利用HTTP的persistence connect ...

  5. 记录一个 spring cloud 配置中心的坑,命令行端口参数无效,被覆盖,编码集问题无法读取文件等.

    spring cloud 配置中心 结合GIT , 可以运行时更新配置文件.发送指令让应用重新读取配置文件. 最近在测试服务器实现了一套,结果CPU 实用率暴增,使用docker compose启动 ...

  6. java控制台编译通过,运行出现找不到或无法加载主类的情况

    参考链接:http://www.knowsky.com/1046493.html 当建了一个包之后(假设建的包的名字为com),找到该java文件的com目录,发现编译能够通过,但是运行的时候出现了一 ...

  7. java编译通过,运行却提示找不到或无法加载主类

    问题: HelloWorld.java 1 package myP101; 2 3 public class HelloWorld { 4 public static void main(String ...

  8. 【译文】用Spring Cloud和Docker搭建微服务平台

    by Kenny Bastani Sunday, July 12, 2015 转自:http://www.kennybastani.com/2015/07/spring-cloud-docker-mi ...

  9. Spring Cloud和Docker搭建微服务平台

    用Spring Cloud和Docker搭建微服务平台 This blog series will introduce you to some of the foundational concepts ...

随机推荐

  1. mysql 触发器、流程控制、事务等

    视图 触发器 事务 存储过程 内置函数 流程控制 索引 视图 1.什么是视图 ​ 视图就是通过查询得到一张虚拟表,然后保存下来,下次直接使用即可 2.为什么要用视图 ​ 如果要频繁使用一张虚拟表,可以 ...

  2. Linux程序在Windows下编译运行_MinGW和Cygwin

    linux要在windows下编译运行,需要win下的gcc编译器,一般有两种:MinGW和Cygwin. 但某些函数在windows没有,即使使用两种工具也编译不过,需要查询windows函数并使用 ...

  3. Linux怎么部署docker

    Docker安装 建议在linux环境下安装Docker,window环境搭建比较复杂且容易出错,使用Centos7+yum来安装Docker环境很方便. Docker 软件包已经包括在默认的 Cen ...

  4. css 布局 flex

    cursor 设置鼠标放上去后的形状 visability 设置是否可见 flex 详见这篇文章https://developer.mozilla.org/zh-CN/docs/Learn/CSS/C ...

  5. Educational Codeforces Round 69 (Rated for Div. 2) E. Culture Code

    Educational Codeforces Round 69 (Rated for Div. 2) E. Culture Code 题目链接 题意: 给出\(n\)个俄罗斯套娃,每个套娃都有一个\( ...

  6. python正则表达式(5)--findall、finditer方法

    findall方法 相比其他方法,findall方法有些特殊.它的作用是查找字符串中所有能匹配的字符串,并以结果存于列表中,然后返回该列表 注意: match 和 search 是匹配一次 finda ...

  7. iis7设置http跳转https实测可用

    前面ytkah和大家聊了Apache设置http如何301到https,现在我们说说iis7设置http跳转https,因为还是有很多人在用iis服务器.首先要先安装url rewrite modul ...

  8. You Can Customize Synthesized Instance Variable Names @property

    As mentioned earlier, the default behavior for a writeable property is to use an instance variable c ...

  9. ent 基本使用十二 字段

    字段或者属性,在schema中是定点的属性,比如user 包含4个字段age,name,username,created_at 图表展示如下: 代码描述   package schema ​ impo ...

  10. JS的ES6的async

    1.async概念: 真在意义上解决异步回调函数的问题(由于promise的then方法中还是使用回调函数,而async中await并没有使用回调函数真正意义上解决回调函数),同步流程表达异步操作. ...