- 博客(84)
- 资源 (1)
- 收藏
- 关注
原创 插入实体自增主键太长,mybatis-plaus自增主键
spring-boot整合mybtais执行insert语句时,主键id为长文本数据。1、打印项目执行sql日志,发现insert执行语句中,id已经赋值。2、分析id复制语句,发现是mybatis-plaus自动赋值。2)数据库主键的种子值设置的多少。1)数据库主键设置的时自增。1)数据库主键是否自增。所以排查是数据库的问题。5、mybatis-plaus主键策略。
2025-01-09 23:22:55
277
原创 Lock wait timeout exceeded; try restarting transaction
通过SELECT * FROM information_schema.innodb_trx查询未提交事务,查到一个一直没有提交的只读事务(trx_state=”LOCK WAIT”),找到对应线程,执行:kill 线程ID。找到线程:kill 线程ID。因为使用的数据库为mysql,而InnoDB表类型会出现锁等待的情况,在出现锁等待时,会根据参数innodb_lock_wait_timeout(默认50s)的配置,判断是否需要进行timeout的操作,如果等待时间超过了设置的时间就会报错。
2024-06-14 16:44:53
436
原创 SpringBoot引入WebSocket依赖报ServerContainer no avaliable
点击ServerContainer发现他有很多依赖来自不同的jar,初步排查出来时因为websockets.jsr与websocket.server jar冲突,spring不知道需要用哪个实现,所以跑车。1)第一次排查时只以为时jar冲突问题,以为时引入的封装好的jar包与srping-boot-websocket加入冲突。2)跟踪报错的源码如下:serverContriner不能为null。移除spring-boot-starter-undertow依赖即可。将引入的dep依赖排除发现启动也报错。
2024-06-06 20:58:26
500
原创 解决 Elasticsearch 分页查询记录超过10000时异常
请求设置rest_total_hits_as_int=true。2、修改setting的值。
2023-09-14 10:56:00
1430
原创 Es批量插入数据报异常Unable to parse response body
Es批量插入数据报异常Unable to parse response body
2023-08-16 10:16:40
2032
原创 Caused by: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3236)
Caused by: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3236)
2023-08-16 10:01:26
436
原创 docker容器安装完es之后安装IK分词器
需要注意:ik分词器的版本需要和docker保持一致;3、输入如下命令判断是否执行成功。1、进入docker的容器内部。4、推出docker容器。5、重启docker。
2023-08-14 15:38:24
215
原创 Es 聚合查询 nested分组聚合时无需指定字段类型
行程单索引,一个订单对应多个游客,将游客信息采用nested类型存入订单索引中。//在最外层的查询将agg聚合设置进去,并且使用nested。2.nested分组聚合查询。//统计出现频数最多的前5条。统计游客来源地top5。
2023-04-24 22:23:51
1136
原创 Git指令
4. 从Git栈中读取最近一次保存的内容,恢复工作区的相关内容。由于可能存在多个Stash的内容,所以用栈来管理,pop会从最近的一个stash中读取内容并恢复。3.备份当前的工作区的内容,从最近的一次提交中读取相关内容,让工作区保证和上次提交的内容一致。同时,将当前的工作区内容保存到Git栈中。6. 清空Git栈。此时使用gitg等图形化工具会发现,原来stash的哪些节点都消失了。5.显示Git栈内的所有备份,可以利用这个列表来决定从那个地方恢复。1.放弃本地代码修改。
2023-03-30 16:59:52
102
原创 windows查看mysql 数库的配置文件my.ini(==my.cnf Linux中)
windows查看mysql 数库的配置文件my.ini(==my.cnf Linux中)
2023-02-22 16:21:04
1844
原创 gateway网关启动报错 uable to start web server; nested exception is org.springframework.context.Application
gateway网关启动报错 uable to start web server; nested exception is org.springframework.context.ApplicationWebApplicationType 描述
2022-09-17 17:18:10
3274
1
转载 ES学习文档以及常见关键查询语句
SpringBoot整合es 中configer类的封装@Configurationpublic class ElasticSearchConfig { @Value("${elasticsearch.url}") private String url; @Value("${elasticsearch.username}") private String username; @Value("${elasticsearch.password}")
2022-04-26 17:10:10
567
原创 fastJoin转换为string类型日期格式
String jsonString = JSON.toJSONString(list.get(i), SerializerFeature.DisableCircularReferenceDetect,SerializerFeature.WriteDateUseDateFormat);这一行代码保留了原来的数据格式JSONObject.toJSONString会将日期格式转换为时间戳
2022-03-28 14:11:42
287
原创 【无标题】
"D:\Java use\Java\jdk1.8.0_181\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\ruanjian\Idea\Intel.
2022-01-21 10:56:43
382
原创 ElasticsearchStatusException[Elasticsearch exception [type=invalid_index_name_exception, reason=Inva
ElasticsearchStatusException[Elasticsearch exception [type=invalid_index_name_exception, reason=Invalid index name [UserInfo], must be lowercase]]创建的索引名必须是小写
2021-12-17 10:19:55
3363
原创 ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason
ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Text fields are not optimised for ope.
2021-12-16 17:01:18
7383
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人