
填坑
工作中遇到的坑
G0o0o0o
这个作者很懒,什么都没留下…
展开
-
Elasticsearch Exception [type=illegal_argument_exception, reason=Document contains at least one imme
Elasticsearch Exception [type=illegal_argument_exception, reason=Document contains at least one immense term in field=“xxxx”(whose UTF8 encoding is longer than the max length 32766),all of which were skipped. Please correct the analyzer to not produce such原创 2021-03-05 13:55:49 · 1507 阅读 · 0 评论 -
boolean类型格式化问题
boolean类型格式化问题public class Main { public static void main(String[] args) { // write your code here System.out.println(String.format("%s" , true)); System.out.println(String.format("%b" , true)); System.out.println(String.fo原创 2021-01-06 21:52:21 · 2117 阅读 · 0 评论 -
Gateway启动失败:An attempt was made to call a method that does not exist.
APPLICATION FAILED TO STARTDescription:An attempt was made to call a method that does not exist. The attempt was made from the following location:org.springframework.cloud.gateway.config.GatewayAutoConfiguration$NettyConfiguration.gatewayHttpClient(Ga.原创 2020-08-06 18:35:17 · 1210 阅读 · 0 评论 -
EditPlus导致ElasticSearch中IK分词器添加自定义字典无法实现
首先保证文件命名正确其次保证配置文件中填写的没有问题问题的关键重启之后发现仍然不能展示自定义字典中的词所以想到了编码问题发现默认的是ANSI需要修改为UTF-8这样问题就解决了...原创 2020-08-03 22:12:51 · 347 阅读 · 0 评论 -
double乘法失去精度,double保留小数问题
计算百分比情景:首先相除,然后×100 ;double保留小数/*** 小数点后保留四位位小数*/String result = String.format("%.4f",(dividend / total)) ;double r = Double.valueOf(result) ;double乘法计算失去精度//接上面的代码double result = r * 100 ;这是double可能会丢失精度,比如0.3060 -> 30.59999999···· 我的解决原创 2020-07-23 18:01:35 · 3962 阅读 · 2 评论 -
Fastjson 报错 :java.lang.StackOverflowError: null
场景: <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.44</version> </dependency>想要在实体类中写一个克隆方法public AdtrackReportCard原创 2020-07-17 16:09:42 · 2205 阅读 · 2 评论 -
zookeeper设置retries
<dubbo:reference id="xxxxx" interface="com.dubbo.serivce.xxxxx" version="1.0.0" timeout="2000" retries="0"/>如果没有设置retries,超时后就会重新请求,导致service出现两个或者多个线...原创 2020-05-08 10:35:45 · 370 阅读 · 0 评论 -
spring boot+redis中的RedisTemplate和StringRedisTemplate
Template : 模板RedisTemplate和StringRedisTemplate基础功能差不多不同的是二者实现方法不同RedisTemplate是使用<序列类>将存入的数据先序列化成字节数组, 取出也是将数据字节流转化 。但是如果数据不是字节流存入的,RedisTemplate取出的将会是null。这时候就可以用上StringRedisTemplate。Strin...原创 2019-07-31 21:36:41 · 246 阅读 · 0 评论 -
springboot配置Https:java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.renegotiatePending(J)I问题
开发微信小程序时,小程序请求后台报出了java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.renegotiatePending(J)I我的springboot版本是2.1.1.RELEASE,经过查阅发现2.1.1版本及其以上的内置的tomcat的版本都是9.0.13的,虽然我也不清楚为什么配置Https他要报出这个错,但是还是...原创 2019-11-29 14:26:56 · 3250 阅读 · 1 评论