- 博客(21)
- 收藏
- 关注
原创 常用数据库数据导入导出(备份和恢复)操作文档
实际开发中,我们经常遇到需要备份数据库数据,恢复数据库数据;或者不同环境之间同步数据、用已有环境数据搭建新环境的情况,此时就需要用到数据库的导出和导入(备份和恢复),这里记录一下常用数据库的导入导出操作。
2024-02-23 15:10:20 846 1
原创 spring-data-jpa deleteById踩坑记录
spring-data-jpa deleteById踩坑记录重复删除抛出EmptyResultDataAccessException并发删除抛出ObjectOptimisticLockingFailureException
2023-11-30 16:01:20 203
原创 MongoDB数据备份和恢复(数据同步)
这样就把10.11.11.11:27017的test库,同步到了本地数据库,这种方式不需要停止服务且会同步索引(基于4.4.20版本)
2023-04-24 16:08:45 280
原创 SSL peer shut down incorrectly
HttpClient通过https从外系统获取数据报错SSL peer shut down incorrectly
2023-02-22 09:44:03 16072
原创 Failed to instantiate java.util.List using constructor NO_CONSTRUCTOR with arguments Failed to insta
查询Mongodb出现报错,有的条件有的分页不报错,原因是查询的数据出现脏数据,表中的数据格式和表实体的字段数据类型不一致,如实体中字段类型是list数组,表中查到的数据,该字段变成了单个对象。
2022-12-13 18:15:13 1050
原创 Spring Boot 1.5.10项目引入knife4j接口文档
knife4j是一个在线接口文档项目,对swaggger2进行增强,页面更加美观,功能更加强大在前后端分离的趋势下,团队一直没有接口文档规范,联调接口全凭一个个接口去代码里扒,后端同事忙起来,前端甚至干不了活,所以引入Knife4j。目的是提高开发效率,一定程度方便查找接口避免重复开发添加Knife4jConfig.java配置文件浏览器访问http://localhost:18095/linkus-abp/doc.html效果说明@Api(tags = “计划编制模块”)设置contr
2022-12-07 14:49:52 836
原创 Mybatis配置多数据源
Spring Boot项目使用Mybatis,既要从上游系统同步数据,又要操作本系统的数据库,所以需要引入双数据源,配置Mybatis。
2022-11-30 20:41:21 15726 4
原创 获取当前服务器ip地址
老项目有多个实例,有个定时任务需要限制只在一台机器上执行,选择在代码里限制机器执行的ip,不满足指定的ip就不执行。也有其它的方法,如设置开关、分布式的任务调度框架等等。
2022-09-08 10:42:55 2205
原创 Collections的EMPTY_LIST/emptyList()导致java.lang.UnsupportedOperationException
描述:使用Collections.EMPTY_LIST或Collections.emptyList()返回的空集合,如果进行修改会报错java.lang.UnsupportedOperationException原因:Collections.EMPTY_LIST的类型为EmptyList,没有实现修改方法,实现了AbstractList类// 类型public static final List EMPTY_LIST = new EmptyList<>();// 继承关系priva.
2021-12-22 17:45:24 722
原创 APPLICATION FAILED TOSTART The Tomcat connector configured to listen on port 28888 failed to start.
重启IDE却没有关闭应用,如IDEA更新插件或者闪退导致端口占用服务启动失败启动报错:The Tomcat connector configured to listen on port 28888 failed to start. The port may already be in use or the connector may be misconfigured.1. 报错详情org.apache.catalina.LifecycleException: Failed to start compo
2021-12-07 09:52:03 257
原创 Command failed with error 16412: ‘FieldPath field names may not contain ‘.‘.‘ on server 10.21.20.8:2
问题描述查询接口报错:{"errorMessage":"Command failed with error 16412: 'FieldPath field names may not contain '.'.' on server 10.21.20.8:27019. The full response is { \"ok\" : 0.0, \"errmsg\" : \"FieldPath field names may not contain '.'.\", \"code\" : 16412, \.
2021-12-07 09:33:28 1437
原创 Command line is to long.Shorten command line for KmApplication or also for Spring Boot default confi
springboot项目启动报错Error running 'KmApplication ';Command line is to long.Shorten command line for KmApplication or also for Spring Boot default configuration.选择Edit ConfigurationsShorten command line选择classpath file->Apply->OK重新启动,问题解决...
2021-12-02 17:08:20 317
原创 Disconnected from the target VM, address: ‘127.0.0.1:65038‘, transport: ‘socet‘
启动spring-boot报错Disconnected from the target VM, address: ‘127.0.0.1:65038’, transport: ‘socet’产生的原因maven jar包冲突接口请求有俩个重复的请求导致出错!!解决查看日志,确实有个接口重复的问题同事提交代码没有修改请求路径,注释之后问题解决参考文章添加链接描述...
2021-12-02 16:59:16 8704
原创 Uncaught TypeError: Cannot set property ‘onmouseout‘ of null
html页面引入js文件,改完html后报错Uncaught TypeError: Cannot set property ‘onmouseout’ of nulljs代码块://页面加载完成后注册变迁选择下拉框的鼠标移出,移入事件varisFocusTag=false;varST=document.getElementById('selectTag');alert(ST);ST.onmouseout=function(){isFocusTag=false;}ST为null1、检查前
2021-12-02 16:49:26 806
原创 No converter found capable of converting from type [org.bson.BsonUndefined]
mongodb查询报错No converter found capable of converting from type [org.bson.BsonUndefined]原因查询数据返回对象集合,出现了undifined数据,无法转换为实体类中的String类型。解决办法定位脏数据,删除或者修复数据重点对脏数据如何产生进行排查,修改程序mongodb查询undefined数据 db.getCollection('tableName').find({"fieldName":{$
2021-12-02 16:42:45 4062
原创 Java变量的赋值和方法参数的传递
Java变量的赋值和方法参数的传递变量的赋值如果变量是基本数据类型,此时赋值的是变量所保存的数据值。如果变量是引用数据类型,此时赋值的是变量所保存的数据的地址值。 public static void main(String[] args) { System.out.println("======基本数据类型======"); int m = 10; int n = m; System.out.println("m = " + m
2021-10-21 20:53:49 932
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人