
SpringBoot
CodeChenc
这个作者很懒,什么都没留下…
展开
-
SpringBoot整合redis启动报错
SpringBoot整合redis启动报错No qualifying bean of type ‘org.springframework.data.redis.connection.RedisConnectionFactory’<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId原创 2020-08-03 08:59:08 · 1427 阅读 · 0 评论 -
nginx使用遇到的不容易察觉的问题,巨坑!
nginx配置转发地址漏了斜杆 “/”配置文件location /openapi/search/ { proxy_pass http://search_server_pool/search;} #后端搜索apiupstream search_server_pool{ server 127.0.0.1:40100 weight=10;}如上,转发地址search后面没加斜杆"/",但是浏览器拼接的地址是完整的http://ucenter.xuecheng.com/openapi/s原创 2020-07-31 17:18:44 · 192 阅读 · 0 评论 -
logstach启动成功,但是连接mysql数据库出错
logstach启动成功,但是同步mysql数据出错今天同步索引库时一直连不上mysql,找了半天问题,最后定位是引用的mysql的jar包版本有问题Unable to connect to database. Tried 1 times {:error_message=>"Java::ComMysqlJdbcExceptionsJdbc4::CommunicationsException: Communications link failure\n\nThe last packet succes原创 2020-07-30 14:51:29 · 701 阅读 · 0 评论 -
InputStream和InputStreamReader的区别
InputStreamInputStream获取的是字节输入流,InputStreamReader获取的是字符输入流,InputStream inputStream = process.getInputStream(); //得到字节流//转成字符流InputStreamReader reader = new InputStreamReader(inputStream, "GBK");例如上图,获取到字节流后,但是实际我们需要打印的是字符,就可以这样转换InputStream和ReaderR原创 2020-07-27 22:57:30 · 1562 阅读 · 0 评论 -
SpringBoot启动类@SpringBootApplication
@SpringBootApplication探索@Target(ElementType.TYPE)@Retention(RetentionPolicy.RUNTIME)@Documented@Inherited@SpringBootConfiguration@EnableAutoConfiguration@ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilte原创 2020-07-13 19:31:42 · 173 阅读 · 0 评论